| << Probabilism Part 2 | DIY Kensington + MagSafe >> |
1 year, 4 months ago
So I've long had my little Backups Blow backup script/system for backing up general files and directories on *nix over ftp|s3|ssh|nfs. My world has changed somewhat since I created Backups Blow, and I now have a MacBook, a MacBook Pro and an external hard drive that I want to back them up to. I have my home directories and other files I want backed up stored on ZFS, but needed a script to handle regularly backing up snapshots.
Also, since I created Backups Blow, my scripting language of choice has changed from Perl to Python. All of this has led to the creation of ZFS Backups Blow, which for now is just a single little Python script which I have stuck in the Backups Blow git repository.
Why is this little script of mine worth sharing? Thanks to the magic of ZFS snapshots, with this short script alone, you get a flexible backup solution. What it doesn't handle so far is removing snapshots from your backup medium, but for my personal purposes, that isn't a huge concern (the backup medium is considerably larger than the media being backed up). What it does handle so far is: Rotating backups on the source medium, keeping the current and one previous snapshot (this allows for incremental send|recv, and recovery from "oops" mistakes); uniquely named, by timestamp, backups on the backup medium; recursively backing up from any depth of your ZFS hierarchy (ok, it doesn't actually handle doing it in a non-recursive manner at all); minimal, not very smart detection when to do a full send and when to do an incremental; and a decent amount of "am I behaving sanely" checking. The known bugs in the script at this point are failure handling. Behavior on a failed sanity check is less than ideal.
To use this script, read the script, then set the variables at the top and stick it in your crontab, or (on OS X) use a launch agent.
Also, since I created Backups Blow, my scripting language of choice has changed from Perl to Python. All of this has led to the creation of ZFS Backups Blow, which for now is just a single little Python script which I have stuck in the Backups Blow git repository.
Why is this little script of mine worth sharing? Thanks to the magic of ZFS snapshots, with this short script alone, you get a flexible backup solution. What it doesn't handle so far is removing snapshots from your backup medium, but for my personal purposes, that isn't a huge concern (the backup medium is considerably larger than the media being backed up). What it does handle so far is: Rotating backups on the source medium, keeping the current and one previous snapshot (this allows for incremental send|recv, and recovery from "oops" mistakes); uniquely named, by timestamp, backups on the backup medium; recursively backing up from any depth of your ZFS hierarchy (ok, it doesn't actually handle doing it in a non-recursive manner at all); minimal, not very smart detection when to do a full send and when to do an incremental; and a decent amount of "am I behaving sanely" checking. The known bugs in the script at this point are failure handling. Behavior on a failed sanity check is less than ideal.
To use this script, read the script, then set the variables at the top and stick it in your crontab, or (on OS X) use a launch agent.
Add Comment
| << Probabilism Part 2 | DIY Kensington + MagSafe >> |
"You give me Governor Ventura, myself and eight more of my fellow Navy SEALS -- and we could paralyze the entire country of the United States of America" --Richard Marcinko
Comments