Limit size of Time Machine backup on WD My Book Live

Normally Time Machine will use up much space as is available on the WD My Book Live hard drive. However, there is a simple fix to limit the size of any Time Machine backup volume, and it’s pretty easy to do on a My Book Live. Just replace the Time Machine sparesebundle with a custom size sparesebundle. Here’s how.

Set a Static IP

First, it is always a good idea to go into your router’s settings and give your My Book Live a static IP address. If you haven’t done this, I highly recommend it. I won’t go into details on how to do that here because if you don’t do this it’s not the end of the world. Just know that if the IP address of your My Book Live changes in the middle of a backup you may run into issues or have to start the backup again later.

Step 1 – Enable SSH on the My Book Live

You need to temporarily enable SSH on the My Book Live. If you don’t know what this is, don’t worry. You’re going to turn it off when you’re done.

Western Digital's MyBookLive renamed to MyBookLive2TB

You can find the name of your drive by looking in the Finder’s sidebar

Open your browser and enter in the address bar http://mybooklive/UI/ssh. If you have changed the name of your My Book Live, replace mybooklive with your name for the drive. In my case, I’d type in http://MyBookLive2TB/UI/ssh since I have renamed my drive to MyBookLive2TB. Alternatively, if you have given your drive a static IP you can use that in place of the drive name.

Once the page loads, check the box to enable SSH Access.

Step 2 – Create a Backup File

If you are already using your My Book Live for Time Machine backups you can skip to Step 3.

If not, open System Preferences > Time Machine and click on Select Disk. Choose your My Book Live Time Machine backup volume.

The MyBookLive Time Machine volume in System Preferences

Start the backup and let it run for a few minutes so that the Time Machine volume gets created on the My Book Live, then turn off Time Machine backups using the Preferences pane (you don’t need to let the backup finish). It is important that Time Machine is off – you don’t want it to start up again until you’re finished.

Step 3 – Find Your Backup File

Open Terminal and SSH into your My Book Live using the following command:

ssh root@mybooklive

or replace mybooklive with the drive’s static IP or whatever you have renamed it to. The password should be welc0me.

Again in your Terminal, type in

ls /DataVolume/backup/TimeMachine/

You should see a list of folders, one of which is your Time Machine sparsebundle (if you don’t, run your backup in Step 2 for a little longer). Remember the name of your own file…you’ll need it during the next step. I’m going to pretend yours is called Backup.sparsebundle…whenever you see that, replace Backup with the name of your own sparsebundle.

The Time Machine sparsebundle on the My Book Live

You can see my Time Machine backup file here – NSMB.sparsebundle

Step 4 – Create Custom Size Time Machine Sparsebundle

Open up a new terminal window and use the following command to create a new Time Machine sparsebundle. Here’s what you’ve been waiting for: the 250g means that this sparsebundle can only take up 250GB of space. Change this to whatever value you like. You’ll also need to insert your username and change the name of your sparsebundle to whatever it was called on your My Book Live in Step 3. The name of the newly created file must match the one found on your My Book Live in Step 3.

hdiutil create -size 250g -fs HFS+J -volname “Time Machine Backups” /Users/USERNAME/Desktop/Backup.sparsebundle

The file will not take up 250GB on your computer (it will probably use up less than a GB of space), but it might take a moment for it to be created.

Step 5 – Replace Your Old Time Machine Backup File

Drag your new sparsebundle to your My Book Live drive. It doesn’t really matter where. Your Public folder is a good option. Once it’s there, open up the terminal window that you used to SSH into your My Book Live. Use the command below to replace your old Time Machine backup with your new sparsebundle. Remember to replace Backup.sparsebundle with the name of your own Time Machine sparsebundle.

rsync -a –progress /DataVolume/shares/Public/Backup.sparsebundle /DataVolume/backup/TimeMachine

This could take a while. Do not proceed until the rsync is complete.

Step 6 – Turn on Time Machine Backups

You can delete the sparsebundle in your Public folder. Go back into Time Machine in System Preferences and turn on backups again. If a backup doesn’t begin, force a backup by clicking the Time Machine icon in your menu bar. If you get a prompt about the identity of the backup disk changing, click Use This Disk. That should be it. Let a full backup run. If everything is OK, go back to the URL in Step 1 and disable SSH access on your My Book Live.

Time Machine's prompt about backup disk changing

View All

10 Comments

  1. Hi, thanks for the post. It is a pain that WD didn’t think about this in advance.

    I have a question regarding your workaround. I just tried this and it worked so far, right now Time Machine is creating the first backup.

    (By the way, on my MBL the paths are different. The sparsebundles are located in /shares/TimeMachineBackup/TimeMachine, though I have a folder /DataVolume/backup. I am running a 2TB MBL with firmware MyBookLive 02.32.05-046 : Core F/W.)

    In system preferences, Time Machine still states that the available space is 1.7 TB of 1.99 TB. Is this simply an error by Time Machine or did something go wrong during the creation of the new sparsebundle (500 GB)?

    Reply

    1. I also see the space as 1.69 TB available. Is this correct? Will Time Machine Now manage it’s own backup deletion correctly?

      Many thanks for the post

      Reply

      1. Yes, that is correct to see the free space of the volume. Time Machine reports the size of the volume since it normally expands to fill the entire volume if needed.

        Before each backup Time Machine tries to increase the size of its sparsebundle…but in this case it won’t be able to since you’ve limited it. You can download a dashboard widget called Time Machine Buddy (http://www.apple.com/downloads/dashboard/status/timemachinebuddy.html) to see the log of what’s happening when you do a backup. If you want to confirm that the .sparsebundle won’t grow indefinitely, watch Time Machine Buddy during a backup and you’ll see a line or two where Time Machine tries to expand the .sparsebundle but fails.

        Reply

        1. If they reported the free space available on your .sparsebundle it would be 0MB all the time since the .sparsebundle expands only to fill your backup…it doesn’t take up more space than the amount of files that need to go inside.

          Reply

        2. Okay, thanks for clarifying.

          Reply

    2. Actually, there is a way to limit the size of the backup in the MyBook Live web interface – I don’t know how long it’s been there, but here it is (see screenshot).
      https://dl.dropbox.com/u/3183692/MBL_TimeMachine.png

      Reply

      1. That’s great that they finally added this to the settings. This has not been around for quite some time.

        Reply

      2. I don’t have that option on my My Book Live Duo and I’m using the latest firmware. Is this only on SIngle-drive versions or do you use a beta firmware?

        Reply

        1. I have firmware version MyBookLive 02.32.05-046 : Core F/W. I don’t think it is a beta version.

          Have you checked the support forums at http://community.wdc.com/t5/My-Book-Live-Duo/bd-p/mbl_duo ?

          Reply

  2. Hi, I’m running 10.8.3 and Time Machine is always able to resize the sparsebundle to the original value, making the overraid of the rsync setting. I have found in another post http://untoro.wordpress.com/2011/06/07/how-to-limit-space-used-by-time-machine/ the procedure that allows using the SetFile command to avoid TM to resize. SetFile is part of the developer package but if you want to extract only this command you have to have Pacifist (http://www.charlessoft.com/) and the installation DVD.

    Reply

Leave a Reply

Your email address will not be published.