In 2012 and 2014 I've blogged about my FreeBSD based backup system. Lucky me didn't need it until now. But this month I've got a new computer and took this as a chance of testing the full restoring of all data. I've learned two lessons I've want to share here.
1) rsync doesn't like --delete and --exclude together. In fact
if used both it won't delete old files. Thus after restoring all my
data I had a lot of already delete files making the backup somehow
unusable to work right with it (but still better than having no data
In order to get around this bug I had to call rsync for all the
wanted directories. So instead of one rsync call I had to do 13.
Putting 13 calls in a script is easy but entering 13 passwords is
awful. After some searching I've found that you can use the
environment variable RSYNC_PASSWORD and read the password via read.
This is the resulting script:
read -p "Password: " passw; echo
--delete $dir/ email@example.com.X::archive/working_backup/machine/$dir
2) The splitting of the pool into subdirectories isn't necessary.
You can clone a snapshot. The clone is direct accessible and costs
no additional disc space. I've read that you can access snapshots
via /mnt/zfs/.zfs but I couldn't find ith on my FreeBSD machine but
I can confirm the clone method.