ZFS Send / Receive Recursively Without Properties

Tim Gustafson tjg at ucsc.edu
Mon Jan 5 19:05:56 UTC 2015


Hi,

We're using ZFS send/receive to maintain off-site snapshots of system
"A" onto system "B" for redundancy.  The data on system "B" is
read-only, and would only ever be used to transfer data back to system
"A" in the event of a hardware failure.

We're currently this command to achieve this:

/sbin/zfs send -R -I 'tank/root at 2015-01-04' 'tank/root at 2015-01-05' |
/usr/bin/ssh -i /root/.ssh/id_rsa 'user at backup-server'
/usr/local/bin/sudo /sbin/zfs receive -v -F -u -n
'tank/notbackedup/source-server/root'

This works well, except that it sets the mountpoints on server "B"
server's copy of the file systems to whatever they were on the source
system, which overwrites server "B"'s root file system when we send
the root file system from server "A".

If I drop the -R parameter to ZFS send, then it does not overwrite the
mountpoints, but it also does not destroy the non-existent snapshots
on the server "B".  Snapshots on server "A" are automatically
destroyed by a script after 7 days, and we don't want to accumulate
snapshots on server "B" that have been destroyed from server "A".  We
also would prefer to not run a snapshot purging script on server "B"
because ultimately this solution will be used for multiple source
servers, and each of them have different snapshot retention policies
that I'd like to not have to maintain in two separate places.

Is there any way to recursively send (and destroy) snapshots on the
server "B" without also copying the mountpoint property?

-- 

Tim Gustafson
tjg at ucsc.edu
831-459-5354
Baskin Engineering, Room 313A


More information about the freebsd-fs mailing list