I’ve been using Dirvish to handle snapshot backups for more than nine months now. I set things up kind of strange initially, so I finally migrated my directory tree to mirror more what the author of the tool originally intended, I think.
If you ever need to mess with the internals of Dirvish, here are the files you need to change when you start moving directories around. First, you reference a particular vault from within your master.conf configuration file. That vault is expected to have a dirvish/ directory. There, you specify the naming scheme for each snapshot. If you’re simply changing the naming scheme, like you want the hour and minute of the backup instead of just the default year, month, and day, there are a few things to change.
You need to change the snapshot/summary file for each snapshot directory you have:
sarah:/snapshot/nebula# cat nebula-etc/20040406/summary client: root@nebula.internal.foo tree: /etc rsh: ssh Server: sarah Bank: /snapshot vault: nebula branch: etc Image: 20040406 Reference: 20040405 Image-now: 2004-04-06 22:00:00 Expire: +20 days == 2004-04-26 22:00:00
You want to change both Image: and Reference: to match whatever you renamed all your directories to. This ensures that you don’t find youself with two copies of the same files because Dirvish couldn’t find your last reference image to hard link to.
For expirations, you’ll want to change your history file too under your dirvish/ directory in a manner similar to how you changed the preceding file.
Excellent, and it still works.
sarah:/snapshot# dirvish-runall 23:25:07 /usr/sbin/dirvish --vault nebula-etc --image-time "23:00" 23:25:13 /usr/sbin/dirvish --vault nebula-home --image-time "23:00" 23:40:12 /usr/sbin/dirvish --vault rebecca-etc --image-time "23:00" 23:40:22 /usr/sbin/dirvish --vault faith-etc --image-time "23:00" 23:40:30 /usr/sbin/dirvish --vault faith-home --image-time "23:00" 23:43:02 done sarah:/snapshot# dirvish-expire Expiring images as of 2004-04-26 23:45:21 VAULT:BRANCH IMAGE CREATED EXPIRED faith:etc 20040406 +20 days == 2004-04-26 22:00 faith:home 20040406 +20 days == 2004-04-26 22:00 nebula:etc 20040406 2004-04-06 22:09 +20 days == 2004-04-26 22:00 rebecca:etc 20040406 2004-04-06 22:10 +20 days == 2004-04-26 22:00