Limit Time Machine size in Big Sur
Solution 1:
Yes it's possible, but not by the Disk Utility, because you can't set a role to your Volume by this way. But the diskutil command by the terminal application do it very well.
For example, i've a Container of 80 Go and i want create a Time Machine volume how will not exceed 20 Go :
xxxxxxx ~ % diskutil ap list disk4
|
+-- Container disk4 8C53B410-FC36-4221-9F13-F528C24CA4EC
====================================================
APFS Container Reference: disk4
Size (Capacity Ceiling): 80000000000 B (80.0 GB)
Capacity In Use By Volumes: 121966592 B (122.0 MB) (0.2% used)
Capacity Not Allocated: 79878033408 B (79.9 GB) (99.8% free)
|
+-< Physical Store disk3s5 D6E20B9A-34FF-462E-8AEE-5648523C1E5D
| -----------------------------------------------------------
| APFS Physical Store Disk: disk3s5
| Size: 80000000000 B (80.0 GB)
|
+-> No Volumes
In the following command
APFSX is for the APFS Case-sensitive format (for the saves TM)
-quota 20g limits growth to 20 Go for this volume
-role T indicate that the volume is a "Backup TM"
xxxxxxx ~ % diskutil ap addvolume disk4 APFSX Time_Machine_BS -quota 20g -role T
Will export new APFS (Case-sensitive) Volume "Time_Machine_BS" from APFS Container Reference disk4 with a 20000000000-byte quota
Started APFS operation on disk4
Preparing to add APFS Volume to APFS Container disk4
Creating APFS Volume
Created new APFS Volume disk4s1
Mounting APFS Volume
Setting volume permissions
Disk from APFS operation: disk4s1
Finished APFS operation on disk4
Then
xxxxxxx ~ % diskutil ap list disk4
|
+-- Container disk4 8C53B410-FC36-4221-9F13-F528C24CA4EC
====================================================
APFS Container Reference: disk4
Size (Capacity Ceiling): 80000000000 B (80.0 GB)
Capacity In Use By Volumes: 122675200 B (122.7 MB) (0.2% used)
Capacity Not Allocated: 79877324800 B (79.9 GB) (99.8% free)
|
+-< Physical Store disk3s5 D6E20B9A-34FF-462E-8AEE-5648523C1E5D
| -----------------------------------------------------------
| APFS Physical Store Disk: disk3s5
| Size: 80000000000 B (80.0 GB)
|
+-> Volume disk4s1 8E6FC6CF-149A-4A8C-BD4E-228953A8C07F
---------------------------------------------------
APFS Volume Disk (Role): disk4s1 (Backup)
Name: Time_Machine_BS (Case-sensitive)
Mount Point: /Volumes/Time_Machine_BS
Capacity Consumed: 704512 B (704.5 KB)
Capacity Reserve: None
Capacity Quota: 20000002048 B (20.0 GB) (0.0% reached)
Sealed: No
FileVault: No
If there is no volume selected for Time Machine saves, immediately TM proposes to use this volume.
After the first save (small because i'm on a test Big Sur install) the result is :
xxxxxxx ~ % diskutil ap list disk4
|
+-- Container disk4 8C53B410-FC36-4221-9F13-F528C24CA4EC
====================================================
APFS Container Reference: disk4
Size (Capacity Ceiling): 80000000000 B (80.0 GB)
Capacity In Use By Volumes: 6738415616 B (6.7 GB) (8.4% used)
Capacity Not Allocated: 73261584384 B (73.3 GB) (91.6% free)
|
+-< Physical Store disk3s5 D6E20B9A-34FF-462E-8AEE-5648523C1E5D
| -----------------------------------------------------------
| APFS Physical Store Disk: disk3s5
| Size: 80000000000 B (80.0 GB)
|
+-> Volume disk4s1 8E6FC6CF-149A-4A8C-BD4E-228953A8C07F
---------------------------------------------------
APFS Volume Disk (Role): disk4s1 (Backup)
Name: Time_Machine_BS (Case-sensitive)
Mount Point: /Volumes/Time_Machine_BS
Capacity Consumed: 6616440832 B (6.6 GB)
Capacity Reserve: None
Capacity Quota: 20000002048 B (20.0 GB) (33.1% reached)
Sealed: No
FileVault: No
The limitation is that it's impossible, to my knowledge, to modify the quota without suppress and re-create the TM volume.