Six months or so ago my primary hard drive crashed. Wounds still fresh I enacted a rigorous reliability policy - Mirrored RAID for all drives and “offsite backups” for my media. My old school offsite backup policy is to bring an external drive to work and leave it there for a month. I suppose I could use S3 or something but I’m not that l33t. Given that I never remember to refresh this backup monthly I have to figure out all the commands again, so let’s document them here for future use. I suppose I could use google notebook or something but that would make kushal too happy (also I can never remember the damn URL).
- rsync from one drive to the other.
rsync -av --delete --ignore-errors /Volumes/Salvation/ /Volumes/TI\ Pimpin.--deleteand--ignore-errorsare important so that files I’ve deleted locally get cleaned up and there’s space for new files. Yes, I have a drive named ‘TI Pimpin’. - Copy the iTunes Library over.
cp -r ~/Music/iTunes /Volumes/TI\ Pimpin/
At the “destination site” it’s easy enough to use this iTunes library. Convenient for having backups as well as replicated music at work.
- Replace references from old path to new path.
sed s/Salvation/TI%20Pimpin/g iTunes\ Music\ Library.xml > new_lib.xml - Copy that over.
mv new_lib.xml iTunes\ Music\ Library.xml - Because iTunes likes to use the binary iTunes library when possible, corrupt the file.
cat /dev/null > iTunes\ Library - Startup iTunes and point it at the library by holding down the
optionkey when starting iTunes. It’ll recreate the binary file from the xml file.
sleep 30d and repeat.
One Response to “Backup time”
March 28th, 2007 at 12:59 pm
What could possibly be on the ‘TI Pimpin’ volume?
Leave a Reply