Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I am running an SSD boot drive and a HDD drive on my Macbook Pro 5,5 and I obviously cannot have Time Machine filling up my SSD. I was wondering if there was anyway to have time machine create local backups of the users on my SSD, but store it on my HDD and be able to use the typical features of time machine local backups, because otherwise it would be unnecessary. If this question has been asked, I would appreciate a link, because I searched and could not find anything. Otherwise, thank you very much any help you can offer.

share|improve this question
    
I was wondering whether you managed to move the local Time Machine backups as described in my answer and comment below. If that's the case I'd appreciate if you could mark your question as answered. Thanks! –  jaume Mar 6 '13 at 7:46
    
I just logged on and noticed this. Really sorry it took me so long to mark it as answered. Thanks for the great walkthrough! –  JeffM Mar 25 '13 at 22:08
    
No problem, thanks for your feedback, I'm glad I could help! –  jaume Mar 25 '13 at 22:21

2 Answers 2

up vote 2 down vote accepted

I couldn't find any way of modifying the path /.MobileBackups, but you can create a folder on your HDD and then symlink it to /.MobileBackups:

  1. Open Applications>Utilities>Terminal.

    Now you will have to type several commands. Press return after every command for it to execute. When asked, type your password.

  2. The snapshots folder has complex permissions. The simplest way to preserve them is to copy the existing folder to the new location on your HDD:

    sudo rsync -ahvHE /.MobileBackups /Volumes/HDD/

    (replace /Volumes/HDD with the path to your HDD.)

    rsync options are:

    • -a: archive mode (recursive; copy symlinks as symlinks; preserve permissions, times, owner, group, device files, sockets and fifos)
    • -h: output result in human-readable format
    • -v: verbose, that is, show what the command is doing
    • -H: preserve hardlinks
    • -E: copy extended attributes like resource forks and ACLs
  3. Disable local snapshots (this will delete /.MobileBackups and its contents):

    sudo tmutil disablelocal

  4. Create symlink:

    sudo ln -s /Volumes/HDD/.MobileBackups /.MobileBackups

    (replace /Volumes/HDD with the path to your HDD.)

  5. Enable local snapshots:

    sudo tmutil enablelocal

  6. Create a local snapshot:

    sudo tmutil snapshot

  7. If you see a new snapshot dated "now":

    ls -l /Volumes/HDD/.MobileBackups/Computer/
    (...)
    drwxr-xr-x@ 3 root  wheel  102 Jan 28 09:05 2013-01-28-090534
    

    you're done!

If something went wrong or is not working as expected, revert to the original configuration:

  1. Disable local snapshots:

    sudo tmutil disablelocal

    This will delete the symlink /.MobileBackups. Should that not be the case, delete it with:

    sudo rm /.MobileBackups

  2. Enable local snapshots:

    sudo tmutil enablelocal

  3. Delete alternative snapshot folder on your HDD:

    sudo rm -rf /Volumes/HDD/.MobileBackups

    (rm -rf is a dangerous command that won't ask for confirmation before deleting the folder. Make sure the path is correct!)

share|improve this answer
    
Thanks! That looks great and well-written. I have a small problem that when I disable the local backup, the ./MobileBackup disk image is unmounted and rsync throws an error: building file list ... rsync: link_stat "/.MobileBackups" failed: No such file or directory (2) done sent 29 bytes received 20 bytes 98.00 bytes/sec total size is 0 speedup is 0.00 rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9] Thanks for your help so far, it would be great to get this working, so how did you get rsync to work? Thanks again. –  JeffM Jan 29 '13 at 1:20
    
I overlooked that tmutil disable immediately wipes out /.MobileBackups, that's why rsync complains and exits with an error, sorry for that. I've edited my answer, please try it out (don't forget to enable snapshots with sudo tmutil enable first). –  jaume Jan 29 '13 at 10:14
1  
Jaume- this was extremely helpful. On OSX 10.8.2, this allows me to write the time machine local snapshots, but for some reason I cannot read the contents of the folders in time machine. I'm sure it is some sort of permissions issue, but I can't figure it out. Any ideas? If I copy the folder off the second drive, and change permissions for access, the backups are there and complete. If I enter time machine, it has folders corrsponding to the dates the snapshots were made, but cannot find any contents. I do notice that the permissions are a bit different on the drive i rsynced to- it is not roo –  Benjamin Migliori Mar 5 '13 at 23:18
    
I'm glad it was helpful. As for your question: if you mean the backups are in /.MobileBackups but you don't see them when you enter Time Machine it could be a permission issue. /.MobileBackups is not meant to be accessed directly, and its internal structure, including permissions, is undocumented. You may peek inside (use sudo ls /.MobileBackups/Computer/<date>) or even copy files out of it, but don't change permissions. I'd recommend that you recreate /.MobileBackups from scratch as explained in my answer and test whether it works. If that's the case, it was a permissions issue. –  jaume Mar 8 '13 at 9:10

If you are running OSX 10.8 or higher, something happens when you disable local snapshots such that the existing snapshots are no longer accessible via TM. To resolve this problem, use sudo -s to log in as the root user and execute the following code to modify Jaume's excellent tutorial:

cd /
tmutil disablelocal

rm -rf /Volumes/HDD/.MobileBackups/

tmutil enablelocal
tmutil snapshot
tmutil snapshot

rsync -ahvHE /.MobileBackups /Volumes/HDD/
rm -rf .MobileBackups
ln -s /Volumes/HDD/.MobileBackups /.MobileBackups

tmutil snapshot
tmutil snapshot

That seems to work so far.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.