Using Subversion to safeguard my photos
During the backup project, I created a subversion repository for all of my installation media and installation files - anything I'd need to set up a new computer. The intention was to have a system that was a solid backup for these data, available for download from just about anywhere. Over the months, I've also added other stores to the repository, such as my useful windows standalone tools.
Recently, I thought it would be useful to have all of my digital photos in the repository, both for backup purposes as well as to allow me to, say, have all of my downloaded desktop wallpapers on my machines at work and at home. What better purpose, right? The biggest pain was keeping the repository up to date without constantly needing to issue pseudo-random
svn add commands every time we take pictures. (I could use scplugin to make this easier, but as I found out, it kinda sucks.)
Instead, I turned to my love for shell scripting, and fairly quickly banged this out. I used the handy
svn status command with impunity to help me handle recursive adds and deletes.
Of note, yes, I wish SyntaxHighlighter worked here...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
It would be really nice if there were SyntaxHighlighter support for shell scripts. Maybe that's worth working on myself, eh? Updated 2009-01-12: Sha-Zam!
This also required some modification to my rdiff-backup cronjob since, well, I didn't want to back up every single .svn directory and included files as that would effectively double the backup requirements for that directory. So, I played a bit more with rdiff-backup's options and ended up changing from this:
This is obviously MUCH cleaner.
rdiff-backup-files.txt looks like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
That first line,
- /Users/shelton/**/.svn, is by far the most important, and took way too much trial and error to get right. Order of statements is, apparently, VERY important for rsync/rdiff-backup. Another note about the above list, I'm now backing up things that I wasn't before, namely my VM directory, which contains my Parallels virtual machines. It started to make prudent sense, though currently the only VM in there is a very tiny cfg fileset to virtual-boot my BootCamp partition. I've started doing several things differently with regard to my home backup, which I'll have to summarize at some point soon.