How can I limit the size of the Time Machine sparse bundles on the MBL?

Subject pretty well states the problem…

Is there some hdiutil magic I can perform to limit the size of the sparse bundles that the

Time Machine generates on the MBL?

I am backing up two macs to my MBL, I can’t do the third because the mds server keeps

crashing due to some weird file problems…

I can see the bundles if I mount the time machine directory via afp.

Jerry

Maybe you should try contacting WD’s Technical Support about this. You

can do so either by phone or email.

To Contact WD for Technical Support
http://support.wdc.com/contact/index.asp?lang=en

Time Machine will back up to fill all available space. There is no way to change this. It will only begin to delete old backups when the harddrive is at capacity. So,  to limit the size of the sparsebundles, you need the drive to be at capacity. One way to do this in MBL is to create a number of shares such that they take up the drive as far as TM is concerned.

If you are confident with using terminal commands then send me a private message with your email address in and I will send you instructions on how to create a sparsebundle with limited size and add it to the backup volume on the MBL.

Hi Lymedo,

I am interested in the same. Could you please post here how to do it with terminal commands?

Thanks in advance,

ugo

*** READ THIS BEFORE YOU START ***
*********************************************

  1. These instructions assume that you know how to use the Terminal App in Mac OS X.
  2. If you already have a Time Machine backup on the My Book Live you will lose it.
  3. You need to have SSH enabled on the My Book Live.
  4. You should have some understanding of the RSYNC utility in Mac OS X. If you don’t then read up on it before you start.
  5. You will need to create a terminal session on the My Book Live (I use sshXgui off the Mac App Store)
  6. I am running OS X Lion - steps might be differnent in other versions.
  7. From here on My Book Live will be referred to as MBL, Time Machine as TM and the name of your Mac as YourMac.

*********************************************

If you already have a TM backup on the MBL go to Step 5.

CREATING AN INITIAL BACKUP

  1. Go to Time Machine Preferences

  2. Click ‘Select Disk…’

  3. Choose the volume called "Time Machine on “MBL-backup”

  4. Select ‘Use Backup Disk’ and select ‘Back Up Now’. This will automatically create a sparsebundle in the TimeMachine directory on the MBL backup volume. Let Time Machine backup a few MB of data and then stop the backup. Turn off TM backups in the preferences so it doesn’t try and start up whilst you are completing the following steps.

FIND THE NAME OF THE SPARSEBUNDLE

  1. Create a Terminal session on the MBL and use the ls command to list the contents of the TimeMachine directory on the backup volume:
    Username: root
    Password: welc0me
    Command:  ls /DataVolume/backup/TimeMachine/
    This is how it should look when complete:

    MBL:~# ls /DataVolume/backup/TimeMachine/
    YourMac.sparsebundle Network Trash Folder Temporary Items
    MBL:~#

 *** The sparsebundle in this directory is the one you are going to replace ***

CREATING A NEW SPARSEBUNDLE WITH LIMITED SIZE

  1. Create the new sparsebundle on your desktop using the following command in a local Terminal session:

    hdiutil create -size 250g -fs HFSX -volname “Time Machine Backups” /Users/USERNAME/Desktop/“YourMac”.sparsebundle

Change the 250g to whatever size in GB that you what the size to be.
Replace USERNAME in the command to your Mac user name.
Replace “YourMac”.sparsebundle with the name of the sparsebundle from Step 5.

*** Once created, open the sparsebundle with Disk Utility and set ‘Enable Journaling’ ***

  1. Copy the new sparsebundle to the root of the default Public share on the MBL (this is only to make the rsync command easier to write - you can delete this file after the rsync command is complete).

  2. Now you can run the rsync command to replace the sparsebundle created in Step 4 with the sparsebundle created in Step 5.
    Using the terminal session on the MBL:

    rsync -a --progress /DataVolume/shares/Public/“YourMac”.sparsebundle /DataVolume/backup/TimeMachine

This command copies the new sparsebundle from the Public share (ref. Step 7) to the TimeMachine directory on the backup volume (ref. Step 5). THIS MAY TAKE SOME TIME.

  1. Turn TM back on in the preference pane and start the backup IN FULL. You might get a warning saying the identity of the backup has changed. If you do select the option to use the new one.
2 Likes