Skip navigation
This discussion is archived

Time machine MaxSize configuration option ?!

10045 Views 5 Replies Latest reply: Dec 30, 2008 10:34 AM by Bert Sierra RSS
David Martin9 Calculating status...
Currently Being Moderated
Sep 24, 2008 11:09 AM
It appears that Time Machine has an option "MaxSize" to limit the amount of space it uses:

$ plutil -convert xml1 -o - /Library/Preferences/com.apple.TimeMachine.plist
...
<key>MaxSize</key>
<integer>0</integer>
...

Where, presumably, 0 means no limit. Does anyone know what this option controls, exactly, and what units (KB,MB,GB) this value is in?

For example, I'd like to set a 100GB limit. If the units are MB, then that would be done like this:

$ defaults write /Library/Preferences/com.apple.TimeMachine MaxSize 100000

Thanks for any tips!
MacBook Pro 2.4 GHz, Mac OS X (10.5.5)
  • Glenn Carter Level 4 Level 4 (3,360 points)
    Currently Being Moderated
    Sep 24, 2008 12:13 PM (in response to David Martin9)
    David,

    Actually, I don't think that "MaxSize" here is referring to disk image size. This .plist is for the settings in the TM System Preferences.

    Specifically the settings for the "Option..." pane of TM Prefs. You'll notice it listed among the settings for "Backup up while on battery power" (RequiresACPower) & "Warn when old backups are deleted" (AlwaysShowDeletedBackupsWarning).

    RequiresACPowerWMaxSizeZAutoBackup[BackupAlias_
    IncludedVolumesAlwaysShowDeletedBackupsWarningIncludedVolumeUUIDsYSkipPaths

    My guess is that "MaxSize" refers to the "Total Included: XX.x GB" display on the right of that same "Options..." window.

    What do you think?

    Cheers!
    MacBook Pro, Mac OS X (10.5.4), MacBook, PowerBook G4, Time Capsule, AppleTV, AEBS, 2 iPhones
  • Bert Sierra Calculating status...
    Currently Being Moderated
    Oct 28, 2008 8:35 AM (in response to David Martin9)
    You need to be careful to preserve the fact that the MaxSize parameter should be an integer for TIme Machine to work properly. By default, "defaults write" builds a string value. In my tests this has the undesirable effect of causing the "backupd" process to crash when it kicks in to run Time Machine backups. You can spot the crash in /var/log/system.log and /Library/Logs/CrashReporter.

    You need to explicitly specify the "-integer" (or "-int") data type, as in:

    $ defaults write /Library/Preferences/com.apple.TimeMachine MaxSize -integer 100000

    I'm still testing what the effect of this parameter is, but by best guess so far is that it's the limit, in KB, that the TM data will grow to. It's independent of the size of the .sparsebundle, which is either set to the size of Time Machine's AFP share or possibly the free space on that share (not sure which yet).
    Intel iMac Core 2 Duo, Mac OS X (10.5.3), 4GB RAM, SuperDrive, Airport
  • joelm1 Calculating status...
    Currently Being Moderated
    Nov 7, 2008 7:34 AM (in response to Bert Sierra)
    Just curious, any luck in determining what this parameter does specifically?
    MacBook Pro, Mac OS X (10.5.5)
  • Bert Sierra Level 2 Level 2 (285 points)
    Currently Being Moderated
    Dec 30, 2008 10:34 AM (in response to joelm1)
    Sorry for taking so long to get back to your question:

    Unfortunately, from what I can see, the maxSize parameter does not limit the size of the Time Machine backup. In fact, I'm not sure what it does (if anything). I had set three Macs up with independent 200GB, 5GB and 1GB maxSize limits using the commands below (note the use of the '-integer' type coersion), but in my tests Time Machine consumed 316GB, 100GB and 63GB respectively on the server after two months of operation. I had assumed that the unit of measurement is "K", which may not be the case.

    defaults write /Library/Preferences/com.apple.TimeMachine MaxSize -integer 209715200
    defaults write /Library/Preferences/com.apple.TimeMachine MaxSize -integer 5242880
    defaults write /Library/Preferences/com.apple.TimeMachine MaxSize -integer 1048576

    It appears that in order to limit the size of the Time Machine backup you need to limit the size of the .sparsebundle associated with Time Machine. Left alone, Time Machine will eventually gobble up the entire volume it is hosted on, especially when you run several users off the same network share. The technique I'm experimenting with now for limiting the Time Machine size is described here, and in addition, I'm now setting MaxSize to the default state ("0" meaning "unlimited"):
    http://www.macosxhints.com/article.php?story=20071108020121567

    The article talks about SMB-based Time Machine vaults, but the limiting technique should work equally well for AFP-based Time Machine vaults. I'm finding that you also need to pay attention to permissions to prevent a security hole. After you've swapped the limited .sparsebundle for the default "unlimited" .sparsebundle that TimeMachine creates, I'm running "sudo chmod -R go= <thesparesebundle>" where <thesparebundle> is the name of the .sparsebundle on the server. This prevents one user from peering into another users Time Machine backup.

    Lastly, I also associated an ACL with the network share in an effort from preventing one user from being able to delete another user's Time Machine .sparsebundle, but with OS X 10.5.6 I had to modfy the ACL to allow deletion for TimeMachine to work properly. Originally the ACL I used was:

    chmod +a "group:timemachine allow list,addfile,search,add_subdirectory,readattr,writeattr,readextattr,writeextattr,readsec urity,limitinherit"

    This was working from mid-October through December 18th 2008. I think it was the OS X 10.5.6 update I installed on my clients which started causing Time Machine to start producing an error which read "The backup volume is read only", and if I reselected the TimeMachine volume it said that the volume did not have write or append access (which it did). It was necessary to add delete+delete_child access to the ACL, and then Time Machine started purring along again, but this defeated part of the reason the ACL was in place. The ACL I'm now using on the TimeMachine share is:

    chmod +a "group:timemachine allow list,addfile,search,delete,add_subdirectory,delete_child,readattr,writeattr,readextattr, writeextattr,readsecurity,limitinherit"


    I'd be interested in what other folks have found works and doesn't work where limiting the Time Machine size is concerned.
    iMac 2.66GHz Intel Core 2 Duo, Mac OS X (10.5.6), 4GB RAM, SuperDrive, Airport

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.