I’ve been learning a lot about the Time Machine feature of Apple’s OS X 10.5 (Leopard) and wanted to take the time to share my experience. In a nutshell, Time Machine watches the files that get modified on your system and copies them to a secondary hard drive or network volume so that you have automatic backups available for anything that was deleted or modified.
It is a very nice user experience and it takes a lot of the work out of making backups. Of course, by taking work out Apple is really just making decisions for the majority of users and for most users, that decision is quite acceptable. I’m not most users. Fortunately, Apple directly or indirectly provides methods for changing the behavior of much of the OS and Time Machine is no exception. Here are many of the things that I’ve gathered over the last few months that might benefit you if you want to get more out of your experience.
I won’t go into too much detail as I’m going to presume you’ve already used Time Machine and are familiar with how it works. Generally, it performs a backup of your system every hour to an external drive. It is efficient in that only the modified files are copied. Hourly copies are kept for for 24 hours, daily copies for a month, and weekly copies until the destination drive fills up. You are free to put other data on that Time Machine disk, but it will eventually consume all available space.
Space is pretty efficiently used in that a file is copied only if it has changed but ineffecient in that a small change to a large file results in the entire file being backed up again. This can be a problem if the file really is big and changes frequently. This is the case with the virtual hard disk used for a virtual machine under VMware Fusion or Parallels Desktop.
Backing-up to a network volume
Any self-respecting geek has more than one computer in his or her home. Often times, you are using a laptop and have a dedicated computer with more storage sitting by your TV or in the den, closet, or garage. Unfortunately, while Time Machine can back up to a network volume, by default it only supports a specially presented volume served via Apple’s network filling protocol (AFP) from Leopard Server. You can back up to other choices (e.g., Windows or Linux) via Microsoft’s filing protocol (CIFS). To do this, you first need to have a native Apple file system to copy the data to.
Creating a sparseimage
OS X has supported disk images since the beginning but has recently added a format called sparseimage that starts small but grows as more data is added to it. To use a network volume, you first need to create the image that your machine will be storing the actual data in. Type the following on a mac creating the disk on a local hard drive first:
hdiutil create -library SPUD -size $SIZESPEC -fs HFS+J -type SPARSEBUNDLE \
-tgtimagekey sparse-band-size=262144 -volname "Backup of $MACHINENAME" \
Here are explanations on the options that you’ll want to change:
$SIZESPEC – the size of the virtual disk when filled. A good choice is twice the size of what you’re backing up.
$MACHINENAME – The name of your machine
$MAC – The network address of the primary network interface without separators (e.g., aabbccddeeff0011). You can get this from System Profiler or Network Utility.
For education purposes, here is some explanation of some of the other items:
-fs HFS+J – make the filesystem HFS+ with Journaling (the default OS X filesystem)
sparse-band-size – the size of the ‘chunks’ that make up the sparseimage (they aren’t just one single file). Normally, the images are made in 8M chunks but those perform quite poorly over the network. The value provided above represents 128M chunks (2 * 128 * 1024 512-Byte-Blocks = 262144 = 128MB) which is a good size for a hard disk backup.
Copying the image to to the network volume is as simple as dragging the sparseimage file via the Finder or do it in the terminal:
cp -r $MACHINENAME_$MAC.sparsebundle /Volumes/path/to/destination
The last part is to tell the system to allow any network volume as a destination and not just AFP:
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
Using just part of a drive
For some reasons you’ll see below, I wanted to limit the usage of the destination drive local to the system. Normally, Time Machine will use all the space of an external drive chosen as the destination. If you are storing other information on it, that can become a problem. The solution is to convert the physical Time Machine destination volume into a disk image.
The first step is to create a disk image with the same information above. Next, mount the newly created disk image:
hdiutil mount /path/to/created/imagefile
You can also mount it simply by double-clicking on the disk image file. You’ll then copy the contents of the current Time Machine volume to the created disk image. Note, it is best to ensure Time Machine is disabled as you don’t want anything changing as you are copying it:
sudo asr restore --source /Volumes/srcvol --target /Volumes/Backup\ of\ $MACHINENAME
asr is Apple’s System Restore utility and it performs copy between volumes but ensures that everything is copied properly. You need the sudo portion to have the command be able to access every file which may not be the case if run just as yourself.
Of course, this copy can take some time depending on the speed of your system but mostly due to the size of the data being copied.
Once completed, you can unmount the disk image and configure Time Machine to use the disk that the disk image is stored on. Time Machine is smart enough to use the image if it sees it (the file has to be at the top-level of the destination hard drive).
Trigger a Time Machine backup from the command-line
If you ever want to trigger a Time Machine backup on a system from the command-line, perhaps on a remote system via ssh, issue the following command:
Exclude an individual file from being backed up
You can exclude files from being backed up (like previously mentioned virtual disks) using the GUI in the Time Machine preferences (under Options), but it can also be done using the extended attributes in the command-line:
xattr -w com.apple.metadata com_apple_backup_excludeItem /path/to/file/to/exclude
Similarly, you can see if a file is being excluded but listing the extended attributes:
xattr -l /path/to/file/in/question
Hide the Time Machine disk in the Finder
If you aren’t getting all fancy and writting to a disk image, you may want to hide the destiation disk. You can do that just by making the volume invisible:
SetFile -a V /path/to/Time/Machine/Volume
I hope this has been helpful to you and that with the information are able to make a useful tool even more useful. To give credit where credit is due, I’ve included below the links to where much of the information was originally found.
20090527 I’ve revised the sparse-band-size value from 1G to 128M which is the largest band currently support in 10.5.7. Files with larger band files cannot be mounted in 10.5.7. Once I determine the correct procedure for converting an old image, I’ll post a new article. In the meantime, you can get more information here.
10.5: Set up Time Machine on a NAS in three easy steps
10.5: Improve networked Time Machine performance
Exclude Items From Time Machine Backup With Contextual Menu
Hi. Thanks for your post. Do you by chance know how one can tell which files have been backed up by TM after a specific backup? I occasionally have instances where a large BU is performed even though I don’t think much has changed on my disk. I have already excluded the usual culprits from TM.
Pingback: I need more Time (Machine) | The Occasional Blog
I just did a follow-up post that describes a tool (tms) that will give the information you are looking for.
Pingback: Bookmarks about Icon
Do you have to eject the external drive before you shut down your computer? or can you just shut down the computer and it will eject it properly for you?
OS X is graceful when handling external drives during sleep and shutdown. I’m not sure if you were referring to a physically attached drive (e.g., via USB or Firewire) or a network mount, but it will not be a problem. Of course, it is wise to make sure the system is idle before doing so, though that, too, is handled gracefully.
two things about your hdiutil line
-library SPUD should be -layout SPUD.
your quotation marks are fancy. they should be regular ” otherwise hdiutil gets confused.
. . . that last comment is wrong. -library SPUD is correct.
I cannot find any reference to -library in the hdiutil command reference. -layout however is a possible argument and SPUD can be used with it, so I would say that -layout SPUD is correct…
I’ve googled a bunch of Time Machine related things and decided to post to yours for advice. Where I work, one of the employees had a pirated copy of Maya on his G4 mac mini running 10.5.5. We told him to remove Maya and he did so using Maya’s ‘uninstall’. Much to his and our chagrin, the Maya uninstall started deleting all the applications and even the system preferences. The computer is somewhat crippled now. BUT he did have Time Machine running and I am wondering if I need to jump all the way back to TM’s first backup to restore the computer to the way it was prior to the malicious uninstall? From what I’ve read, TM only backups the apps and OS settings on the first backup? My idea is to copy the 40GB of work related files to an external and then “reset” the computer using TM and then copy the work files back over afterwards. Does that sound feasible? Thanks in advance.
To be honest, I haven’t had the occasion to do a significant restore other than the occasional file. I do know that you can perform a full OS install from the DVD and use a TimeMachine backup to effectively revert the system back to a prior state. How that works in practice, however, I cannot say.
Pingback: Long-term Memory » Blog Archive » Time Machine to a linux server
I do have OS X Server and would like to setup TM for backing up our stuff.
Attached to the server is an external 1.5TB drive (over USB) partitioned into 1TB + remaining space.
The 1TB partition has been shared using AFP and checkmarked ….use as TM backup in the sharing tab of the admin tools. However, when I try to connect to the visible TM share from within TM on the client, I get an error: Operation could not be completed. OSStatus error -6602
I figured it out …. a simple reboot of the server fixed it. :)
This is not directly related to your post, but you seem to know a good deal about TM, so…
I have a Time Capsule at home, and a firewire disk at work. It appears that if I manually tell TM which disk is available, it will do an appropriate incremental backup to that disk. That’s good. The question is, is there anyway to tell TM to look for both disks and use whichever one it finds? Apparently TM has no Applescript dictionary. Have you seen any suggestions?
You have correctly identified the behavior when switching between destinations. Unfortunately, I have not seen any tool to switch the destination by any method other than via the Preference pane. I even looked in the Time Machine prefs file (/Library/Preferences/com.apple.TimeMachine.plist) to see if the defaults command could be used. No luck.
Interestingly, Apple indicated at a WWDC before Leopard shipped that it would support multiple destinations simultaneously (e.g., have more than one set), but that didn’t make the final release.
Thanks for the post – I’d missed that you could set the size of each band within the sparsebundle, so I’m looking forward to the improvements from 128 MB bands.
I have been using TM on my borrowed laptop which I need to give back to my school. I have been backing up to my external hard drive in hopes to easily keep the files and then use them on my emac. The problem is that I can’t even see the volume of the external hard drive when I plug it into the emac. Do you think it is just because the emac is older? It has OS X. The other question I have is, do you know how I can get that volume to show up again on the emac. I can transfer the files I need manually, but I need to see that volume. I have already tried deleting the backup file on the hard drive and it still won’t show up on the emac. Any advice would be helpful. Thanks! I may be buying a new mac within the next year, but it scares me that I wouldn’t be able to access those files until then.
Chances are you just aren’t displaying external disks in the Finder. Open the Finder preferences and in General you can check “External disks” to have it be listed. At that point, you can navigate it easily. You can also choose “Computer” from the Go menu to see all the disks attached to the system. If you’ve hidden the disk with the above command, you can reverse it with “
SetFile -a v /path/to/Time/Machine/Volume“. More information be found on macosxhints: http://www.macosxhints.com/article.php?story=20080124184544791
Hi, I am new to Mac and bought an external drive (USB). I plugged it in and started TM. That is fine, no problem. My question is can you do a system restore like in Windows? Say I put a program on my Mac and run TM before installing it. I install it and my Mac starts acting funny so I uninstall but still acting funny so I want to return it to its previous state it was in before the install. How do I do that? All I have seen so far is if I lose a document or picture I can go and search for it, but I have not yet seen how to actually turn everything back to a certain date.
Thanks and keep up the good work!
It works a bit differently than in Windows. If you include system files with your TM backup (which is default behavior), then you can boot from your OS DVD and restore your system from a TM backup. I would stop short of equating that with Windows roll-back. As you point out, TM is much more reasonable for file-level restores than system-wide changes. On the plus side, OS X doesn’t suffer from something like Windows registry and uninstalling a program is usually as simple as deleting it. You can use something like AppZapper which tries to get the other ‘bits’ associated with a program. Anything more intrusive should provide an uninstaller program to unwind it from the system.
dont work for me, I have Prestigio netdrive NAS, and after all give me a (OSStatus error -6602.)
10.5.8, but stuck here :(
Sorry you’re having problems. Are you mounting as AFP or SMB/CIFS? Have you created the disk image on (or copied it to) the network share? Time Machine backups can only be written to HFS+ filesystems so if you are looking to use any network attached storage, you’ll need a HFS+ disk image on it.
On a Mac laptop, a Leopard upgrade resulted in the creation of a second, duplicate Applications folder on the desktop. Seeking to get rid of this to reclaim the space, I used Appzapper to trash the duplicate software. The Applications folder in the Hard Drive icon showed all the installed software as still there. But what I think might have happened is that Appzapper also trashed some shared, associated files and now Garageband won’t work properly. Other installed software is also giving problems. Thankfully I use Time Machine. How do I use it to restore the hard drive on the laptop as it was before I started Zapping the duplicated software? For the moment, I just want to turn the clock back on the internal drive as a whole, so that it’s how it was before I started getting rid of that duplicated spftware.
Yeah, the mistake was using AppZaper to delete the duplicate software as it likely removed supporting files which made the original copy incomplete. Time Machine is intended for file restoration and not a full system, though if you didn’t exclude system files, you can boot from the install DVD and restore the system from a Time Machine backup. You can also do an install of just the applications from the install DVD to restore GarageBand or other Apple-supplied apps. In the future, simply deleteing (move to trash) of the duplicate Applications folder would keep things functional.
To begin, please note that I am a very non-techical user with ZERO Apple experience. I just purchased the new iMac (21.5) after so many years using a PC. The reason for the switch was the fact that the PC crashed. It could not be fixed without wiping out everything on the hard drive. I took it to a reputable repair shop in town and they said they could get all my files, photo’s etc. but not the programs. Okay that’s a nightmare, but I’ll live. Along with the iMac, I purchased the Time Machine. My question is this…the Store rep said it would back up everything on my computer, including the programs. Can you confirm that his statement is true? Does Apple refer to programs as Applications?
Welcome to the fold. I can’t promise that you’ll not have any problems with your iMac (computers are computers), but I can confirm that OS X and Macs are generally more problem-free than Windows on PCs. By “Time Machine” I believe you are referring to Apple’s Time Capsule (http://www.apple.com/timecapsule/) which is basically a hard drive you put on your network to use as a destination with OS X’s Time Machine. Regardless of destination (Time Capsule or directly attached USB hard drive), Time Machine, when enabled, will back up your primary boot drive and all the files on it.
As an IT professional I have to tell you that data isn’t really safe unless there are two copies with at least one of them not at your location. Time Machine can configured to switch destinations so a decent option would to use a USB drive every few weeks or month that you then keep at work or a friend’s house and then use your Time Capsule for your “regular” backups.
What do i put for the $SIZESPEC if i want an 80GB file?
You can simply use 80g. Of course you could also use 8192m. ;-)
I have an external USB drive I used for Time Machine on one Mac (Mac A) which I connected to another Mac (Mac B) which messed up access to the backups for Mac A so they don’t appear anymore in Time Machine but they’re still in a folder. I messed up the Mac OS on Mac A and now can’t restore it with Time Machine when I use the OS X 10.6 installation disk, I just get a spinning beach ball forever. Is there a way to create a disk image from the first Time Machine backup folder for Mac A and restore it with Disk Utility on the OS X 10.6 installation disk?
Brian, I haven’t had the occasion to do a Time Machine restore from the installation disk but I would believe it would properly recognize a Time Machine disk image. Another option is to do a basic OS install and then use the Migration Assistant (in the Utilities folder) which can also restore users and/or applications from a Time Machine backup.
I have a 1TB Time machine that I wish to use as a standard disk for periodical backups. How do I reconfigure the disk ? Do I just reformat it with a standard file system ? Is it possible to change the characteristics of the disk by using the Airport client ?
Ken, there’s nothing special you need to do to use a disk with Time Machine other than to be sure it is formatted as HFS+. I don’t know if that can be done when connected to an Airport base station, but you can easily do it when directly connected to the system. You should know that if you use a disk directly with Time Machine and not with a disk image created within it, Time Machine will keep using space util the drive is full. If you want to use the drive with other data as well, that may be a problem. I’d suggest an image to help limit the portion used. You can alternatively partition the drive to achieve similar results.
Glad I found this blog – hopefully you can help me out. I have a 1TB external hard drive (seagate) connected to my Airport Extreme base station – we have 2 macbooks (mine and my wife’s) – so far on my laptop TM is running nicely and backing up wirelessly to the seagate hard drive – the problem is that my wife’s laptop cannot seem to find the drive to “Choose Backup Disc…” – do you have any ideas how to get TM running on a 2nd macbook to the same backup drive? Thanks!!
I’ve had a problem like that before. The fix that worked for me was to mount the destination volume first (Finder->Go->Connect to Server…->afp://servername) and then select the volume in the Time Machine preference pane.
I recently installed a new hard drive.. and when i try to restore the system from backup (time machine) absolutely nothing happens. It just won’t load. What should I do?
If your TM backup included system files, you can restore the system by booting the OS DVD and choosing to restore. You can also do a new install and then use the Migration Assistant in the Utilities folder to restore applications and users from a TM backup.
I have 2 1TB external drives hooked up to my mac. I use one for my working files and I want to use the other as a backup. I want to use time machine to backup one to the other. It looks as if time machine defaults to backing up the hard drive. Is there a way to designate an external drive as the info I want to backup?
Thanks for any help!!
David- Time Machine is only intended (and only supports) backing up the system drive. If you want to back up the one external to the other, I would suggest Carbon Copy Cloner which can do that quite well. It won’t have the revisions that Time Machine offers, but it is a copy.
Putting on my IT professional hat, for a moment, I will say that backups don’t count if they don’t follow the 3-2-1 rule: 3 copies in at-least 2 locations with 1 being off-site.
Any chance that this has changed? I would like to use time machine to back up both locally and to a network drive, changing the destination periodically. I was thinking that I could schedule a job to change the destination.
As far as I know that hasn’t changed. It’s a shame, really, as you have a reasonable use case. Interestingly, before Time Machine was release with 10.5 it was going to support multiple drives (e.g., office and home) without requiring any change. For whatever reason, that feature didn’t make to release.
My dad has stumped me with a Time Machine question, as I don’t have it to walk through with him. (Windows at home, Mac at work with other backup). He says his LaCie backup drive shows the Time Machine files all with a date of April 24. . . the info’s all there, but the date’s goofy. Any thoughts that could help him? Thanks very much, I appreciate your blog!
So, the System Preferences shows the last backup as April 24? What happens when he selects backup now? Does it attempt? Does it succeed? Worst case, he can unconfigure Time Machine, wipe the drive, and set up Time Machine again. I’ve encountered some problems with my machines (not like this) and will try to write up new posts covering the problems and solutions (if I resolve them). Sorry I can’t be of more help.
Tom, Blogs 39&40 refer. I’m the inept dad who writes to refine his Time Machine problem. Time Machine records everything properly except for it’s hangup on the day/date. I can go to History, count down any number of lines,and read what was backed up on that actual day. Only trouble is that the software thinks that every day/date is Sat 24 April. FYI my oldest backup is 30 Dec 2009 ( date installed) and the latest is today 20 min ago. Hope this helps. Ever grateful.
Interesting, if I’m understanding correctly, the timeline shown on the right when you enter Time Machine all show the same 4/24 date? That’s strange, indeed. If it works, I guess you don’t have worry unless your OCD is getting the better of you. If that is the case, you can research on Apple’s support boards to see if others have encountered (and fixed) the problem.
Yes,every date from the beginning (Dec 09) is Sat 24 April except for Today and Yesterday. I’ll try the Apple support boards as you suggest. If I come up with a solution I’ll pass it along. Many thanks.
Hi, I’d like to know if it’s possible to have my backups in single folders. For ex. I have a downloads paste could I pack all my backups from it in a single paste instead of multiples downloads pastes for each day of a new backup?
Tx a lot!!
I’m sorry, but I don’t know if I understand your question. Time Machine is designed to represent what your system looked like at the time of the backup. When you start Time Machine, by default it shows the folder that you were in with the previous versions of it displayed. I think you’re asking about restoring multiple files at once. The graphical representation doesn’t allow for that but if you wanted to get tricky, you can use the terminal but I don’t know if that would really be any faster.
Time machine backups after the backup disk is full:
What happens to the integrity of the files backed up after you get the message that the oldest backup will be deleted to make room and you continue running time machine. Can you be assured that all files that currently exist on the hard drive will be there on the backup if you need to do a restore?… or are there then holes in your backup because some old files that you still want on your backup were deleted?
Time Machine uses a concept called hard links to efficiently store its backups. Basically, you can have multiple occurancess of a file (in different locations) but they all point to one actual file so they don’t take any more space. If you change a file, Time Machine will copy over the newer version and future backups will create a hard link of it (if it doesn’t get changed again). So, when older backups are removed, anything that was unique about that backup will be gone. Any file that sill exists on your hard drive will be represented by later backups. Bottom line: Time Machine is for casual data protection. If you really want to guard your data, be sure to follow the 3-2-1 method.
Hi, I have been using TM with a 1T disk to backup data from two laptops. Now I have bought a 2T disk that I want to use with laptop 1, while keeping the other exclusively for laptop 2. Is there any possibility of “moving” the backups of laptop 1 from the old disk to the new one, to have a consistent record of my files, and delete them from the former, to free up space for the laptop 2?
How are the backups being stored on the 1TB drive? If it’s setup somewhat like I describe above (as a disk image on the drive), it should be as easy as moving the disk image to the 2TB drive. If as folders on the drive, I’d would download a copy of Carbon Copy Cloner and duplicate the contents of the 1TB drive to the 2TB drive.
Either way, once completed, see if laptop 1 will recognize and backup to the 2TB Time Machine drive. If that works, remove the contents of laptop 2 from the 2TB drive and the contents of laptop 1 from the 1TB drive.
A lot of websites have information about how to start a Time Machine backup from Terminal, but I can’t seem to find information about how to STOP a Time Machine backup from Terminal. One would expect to use backupd-helper with something like “-stop” but it doesn’t take any such argument. I’d be interested if you figure this out. Thanks.
I did a little Googling and couldn’t find anything akin to a “-stop” for backupd. If I had to, I’d just use the killall command. I tried using a SIGQUIT but that doesn’t seem to do anything other than wait it out. By default, killall send a SIGTERM which should have it stop gracefully but also isn’t the same as selecting “Stop Backing Up”. You may want to experiment with SIGTERM to make sure it doesn’t have unexpected consequences.
I have a 80gb HD in my Mac Mini… but only about 30gb of it is in use. I thought an old 60gb HD would be MORE than enough space. (Since I don’t need to keep many duplicate copies of old files. And since the oldest files will delete automatically.)
My Mac said something about a major POSIX error.
Makes it sound like the drive itself is damaged and unusable. Or is it?
Could it have instead meant: “Your HD is just too small”. (Even though it is FAR larger than my data.)
Sorry, your email was messed up so you won’t see this unless you come back to the site. I suspect the drive you’re trying to backup to as you should be able to use it. I would use Disk Utility to completely erase the 60G drive and making sure it’s formatted as HFS+ (and not MS-DOS). Time Machine should use it happily after that.
Much appreciate your help via IM !
Being a long time Unix/Linux-geek and addicted to the command line, I very much enjoyed this wonderful post.
Regarding the specific question I approached you with, I found the answer…
Time Machine does backup my fstab-mounted /Users partition without problems.
But, as I mounted it with the “nobrowse” option, it made /Users invisible everywhere, even in TimeMachine’s “space” interface.
I linked to this from within a comment in my blog post about Moving /Users to a Separate Partition so my readers can also enjoy from the valuable gems of wisdom you posted here…
I was wondering if you’ve seen the issue that cropped up in 10.6.5 (and 10.6.6) where Time Machine is unable to automatically mount local sparse disk images?
The console reports this as “time machine destination not resolvable” when TM fails. Starting a manual backup or invoking via manually created LaunchDaemon or cron jobs works fine.
As far as I can tell, no one has been able to resolve the issue without resorting to to the above workaround.
Sorry, I haven’t seen that problem myself (yet). I’ll keep you in mind if I encounter it and/or find a solution.
i do have exactly the same problem which is driving me nuts…. timemachine does not back up automatically anymore
I ended up launching the backup process via cron. More on this solution here:
New to Mac and also new to Time machine but did first backup. Subsequent ones seem to take more and more of my external hard drive space – where I also store Itunes, pictures, etc. Is there some way to keep time machine from eating up my space – like limit the size or area of the drive it can use so that it doesn’t rob me of other storage space – without being a programmer!??
If the commands in this or similar posts intimidate you too much, the best option is perhaps to exclude items that are occupying too much space in your Time Machine backups. The biggest possibility is VMware Fusion (or Parallels) virtual machines. When you use your virtual machine, the entire virtual C: drive will get backed up the next time Time Machine runs. That’s a lot of churn. You can exclude folders in System Preferences -> Time Machine -> Options…
The only other ‘simple’ option is to use Disk Utility to partition the drive you are backing up to so that you have a separate Time Machine volume separate from your music, pictures, and data. If you read the online help in Disk Utility (look for ‘Changing a disk’s partitions’) it will tell you how to resize an existing partition without reformatting.
Mike, thanks for a helpful page.
The 10.6.5 regression (breaking automatic backups for sparseimage users) is detailed here:
In theory, the TimeMachineVolumeChanger droplet will now handle these cases correctly and apply the right identifier (defaults read /Library/Preferences/com.apple.TimeMachine DestinationUUID) to the .plist file stored on the sparseimage…
I’m trying it out now — but if you want to link your section on sparseimages to some of these threads that may save frustration for people who are trying to make it work on 10.6.5 or 10.6.6.
Thank you for this blog. I am also afflicted by the errors. I ran the terminal command and got this:
Jun 20 06:08:20 Reza-Gorjis-iMac-27-inch com.apple.backupd: Backing up to: /Volumes/Time Machine/Backups.backupdb
Jun 20 06:08:20 Reza-Gorjis-iMac-27-inch com.apple.backupd: Error: (22) setxattr for key:com.apple.backupd.ModelID path:/Volumes/Time Machine/Backups.backupdb/Reza Gorji’s iMac 27 inch size:8
Jun 20 06:08:20 Reza-Gorjis-iMac-27-inch com.apple.backupd: Error: (-50) Creating directory 2011-06-20-060820.inProgress
Jun 20 06:08:20 Reza-Gorjis-iMac-27-inch com.apple.backupd: Failed to make snapshot container.
Any insight into this. I even called Apple Care and the gentleman could not help.
Sorry, I haven’t run up against that one before. FWIW, I’d suggest running Disk Utility to verify the TM backup volume to make sure there isn’t anything wrong. Worst case (though not ideal), is to set aside the TM volume (for recovery purposes) and start with a new one. Sorry I can’t be more helpful.
Time Machine Testing via Apple Remote Desktop
Time Machine Results are stored as a numeric code in:
All error codes are listed in:
You can test with the following commands:
# Returns the numeric result code, 0=No Error, 19=The backup disk is not available…
defaults read /var/db/.TimeMachine.Results RESULT
# Returns the last complet backup date
defaults read /var/db/.TimeMachine.Results BACKUP_COMPLETED_DATE
I also learned alot about TimeMachine while spending hours to find a workaround for the problem with automatic backups.
External USB harddrive (simple and effective :), one Partition with HFS, journaled, case-sensitive
on this disk a crypted sparsebundle with the hosts MAC address as name (i don’t like the idea of “loosing” the external disk somehow and exploiting all my personal stuff :)
a while ago it stopped making backups automatically, but it worked perfectly when starting a backup manually (mounting the sparsebundle automatically). This became very annoying, because the best feature of a backup tool is doing it silently and regularly – automatically.
I fiddled around really alot with all tools I found on my mac and came up with a workaround that triggers a backup automatically, but one still has to click once – but at least it asks regularly automatically :)
Thats the deal:
The time machine would ask “use this backup” and then mount and use the sparsebundle automatically, when the DestinationUUID in the TimeMachine.plist was set to the HFS Partition/Disk of my external drive. After accepting this question, the DestinationUUID gets set to the UUID of the mounted sparsebundle – and with that, automatic backup could not find the backup disk anymore – whether mounted or not.
So I created a cron that resets the DestinationUUID to the UUID of the external Disk regularly (the command “defaults read /Library/Preferences/com.apple.TimeMachine DestinationUUID” prints the currently set DestinationUUID of TimeMachine).
And it works great! TimeMachine asks me about every hour and I just click “use this disk” and it starts backing up…
here’s my cron: copy this into a file and start it every 50 minutes (using “crontab” or CronniX App for example)
# reset DestinationUUID to external disk, this enables automatic backup again, but with questioning
# uuid of external disk (set this to the value set by selecting the external disk in TimeMachine)
# query current uuid
uuid=$(defaults read /Library/Preferences/com.apple.TimeMachine DestinationUUID)
if [ -z “$(ps ax |grep [/]backupd)” -a $uuid != $backup_uuid ]; then
echo “setting UUID = $backup_uuid”
defaults write /Library/Preferences/com.apple.TimeMachine DestinationUUID $backup_uuid
I hope this is of help for anyone out there :)
PS: I heard that OsX Lion supports encrypted backups on external disks by default. I’ll try that soon I think :)
I’m using Time Machine on my 250gb MacBook, using a 320gb WD external drive. All seams to be ok except that the MacBook freezes when a backup is taking place. This is pretty bad as it stops me working for 10 minutes every hour. I thought that you were supposed to be able to carry on working whilst Time Machine was running? Any ideas……………….
Yeah, that should be considered NOT normal behavior. ;-) First, I would suggest disabling TimeMachine while you work to resolve things. Second, try running Disk Utility and perform a repair to see if there is something notably wrong. A final option, if you’re willing, is to wipe the external drive and start over. If you’re not inclined to go that route, you can hit Apple’s support forums to see if there has been others with similar problems. Good luck!
I have a Time Machine question.
I am setting up a two disk mirrored Raid for time machine and I would also like to use the same HDD to stash my photos and itunes library. Is this a safe thing to do? I was going to split the disk into two 500 gig partitions and use one for music and photos and the other for Time machine.
Will this cause an issue should I have to use the disk utility to “fix” stuff? I think that I read that rebuilding permissions can cause issues with Time Machine files.
As long as you’re starting from scratch with the portioning and Time Machine setup, you should have no problems. One will be dedicated to TM and the other for files. FYI, you actually can do both on one partition but the problem is that TM will use all available space so you’ll eventually have a problem if you want to add more files but TM is consuming all available space.
Ok, read through your very helpful blog (much gratitude for the time invested). Unfortunately, it hasn’t answered the issue I am experiencing.
Very long story short, trying to reload a previous version of iTunes application back on to my laptop from Time Machine. I am able to open, view & select iTunes. Everything seems to work just fine & the Restore process seems to be working . . . . then I get an error message telling me I don’t have permission.
I hadn’t run across that particular problem before. I found this thread on Apple’s discussion forums that may help, however.
Thanks for the speedy response. I actually read that one prior to finding your blog.
I really appreciate the suggestion though. I’ve pretty much resigned myself to the new iOS 10.5.2 and the now defunct app resulting from the upgrade.
Pingback: The Reluctant Sysadmin: NAS Time Machine | David Wicks : Writing
Hi! i have got some kind of a problem here. Maybe someone
is willing to help: i did a reset on my time capsuleâ€¦ and now when
i try to do a backup with time machine. it yells at me: Time
Machine couldnâ€™t complete the backup to â€œrokroktcâ€. The backup disk
is not available though it is connected to time machine and i can
take a look at the files already backed up to it.?? hmâ€¦
I haven’t used a Time Capsule, myself. Did you try using the Verify Backups option (hold down the option-key when you click on the Time Machine menubar icon)? Does that check out?
Pingback: GNC-2008-08-28 #403 Live from the Heart of Texas - Geek News Central