Don’t Forget to Backup the Packages
March 28th, 2005
I learned a valuable lesson today about backing up and restoring OS
X desktop systems. Fortunately, I learned it in time to avoid a serious
problem…
For a while now, where I work, I’ve been using the open source
“RsyncX” utility to backup MacOS X desktop systems to a
server. This has worked very well, very reliably, and very efficiently.
When I first tested my backup and recovery system, I was backing up
almost everything on the system. I later read that I didn’t need to get
absolutely everything, so I followed the article’s instructions to
filter out some unnecessary junk. I tested again and everything still
worked. Then I realized I was backing up some “.pkg” files
that I’d downloaded but never installed. I added those to the
“don’t backup” filter and moved on. I didn’t re-test recovery.
Bad move.
almost everything on the system. I later read that I didn’t need to get
absolutely everything, so I followed the article’s instructions to
filter out some unnecessary junk. I tested again and everything still
worked. Then I realized I was backing up some “.pkg” files
that I’d downloaded but never installed. I added those to the
“don’t backup” filter and moved on. I didn’t re-test recovery.
Bad move.
Today I was taking the time to document the
recovery process. It all went swimmingly until I tried to run the
“diskutil” program to repair permissions on the restored boot
disk. It gave me the error “-9997″ which meant “No
packages found”. Turns out that Apple’s Disk Utility relies on a
bunch of package files stored in “/Library/Receipts” to tell
it what the right permissions are supposed to be on the system. By
eliminating “.pkg” files from the backups, I had effectively
made it impossible to restore the system. Even booting from a CD made
the diskutil give the error.
recovery process. It all went swimmingly until I tried to run the
“diskutil” program to repair permissions on the restored boot
disk. It gave me the error “-9997″ which meant “No
packages found”. Turns out that Apple’s Disk Utility relies on a
bunch of package files stored in “/Library/Receipts” to tell
it what the right permissions are supposed to be on the system. By
eliminating “.pkg” files from the backups, I had effectively
made it impossible to restore the system. Even booting from a CD made
the diskutil give the error.
I’ve gone back to my
RsyncX “exclude list” and removed the filtering out of
“.pkg” files. I’ve also run an emergency backup of all the OS
X machines on the LAN to make sure that I get those files on the backups
ASAP.
RsyncX “exclude list” and removed the filtering out of
“.pkg” files. I’ve also run an emergency backup of all the OS
X machines on the LAN to make sure that I get those files on the backups
ASAP.
I tried copying over the “.pkg” files
from the Receipts directory on a similarly configured Mac, but that
didn’t work. Still got the error. I’m now re-imaging that machine so
that I can back it up again and restore a “proper” backup.
Then I can document the process properly for my co-workers.
from the Receipts directory on a similarly configured Mac, but that
didn’t work. Still got the error. I’m now re-imaging that machine so
that I can back it up again and restore a “proper” backup.
Then I can document the process properly for my co-workers.
Yet another little undocumented “gotcha” from OS X.