Date: Mon, 5 Jan 2015 11:05:55 -0800 From: Tim Gustafson <tjg@ucsc.edu> To: freebsd-fs@freebsd.org Subject: ZFS Send / Receive Recursively Without Properties Message-ID: <CAPyBAS728yuSbze%2BmtUTpC97qoo1O8NJtYfoaafKO-ibSEnkpw@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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@2015-01-04' 'tank/root@2015-01-05' | /usr/bin/ssh -i /root/.ssh/id_rsa 'user@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@ucsc.edu 831-459-5354 Baskin Engineering, Room 313A
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPyBAS728yuSbze%2BmtUTpC97qoo1O8NJtYfoaafKO-ibSEnkpw>