I've been playing with this, and it seems what's going on is simply 
poor documentation on how snapshotting and send/recv interact.

Here's the snippet that's been posted prior that will work once and 
then fail on subsequent runs

>>So for example, each night you could do:
>># zfs snapshot -r tank/[EMAIL PROTECTED]
>># zfs send -R tank/[EMAIL PROTECTED]  | ssh <otherhost> zfs recv -d backuptank
>># zfs destroy -r tank/[EMAIL PROTECTED]
>># zfs rename -r tank/[EMAIL PROTECTED] tank/[EMAIL PROTECTED]
>

Basically, this fails on subsequent runs because it's trying to send 
the same-named snapshot to the target and because it's trying to send 
a whole snapshot instead of an increment. In addition, the source 
increment on both systems must match

Here's a revised version:

On the first run:
zfs snapshot -r tank/[EMAIL PROTECTED]
zfs send -R tank/[EMAIL PROTECTED]  | ssh <otherhost> zfs recv -d backuptank

On subsequent runs:
zfs snapshot -r tank/[EMAIL PROTECTED]
zfs send -R -i tank/[EMAIL PROTECTED]  tank/[EMAIL PROTECTED]  | ssh 
<otherhost> zfs recv -d backuptank

zfs destroy -r tank/[EMAIL PROTECTED]
ssh <otherhost> zfs destroy -r tank/[EMAIL PROTECTED]
(in an actual script, "yesterday" must be substituted with a variable 
that specifies the prior snapshot)
-- 

Maurice Volaski, [EMAIL PROTECTED]
Computing Support, Rose F. Kennedy Center
Albert Einstein College of Medicine of Yeshiva University
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to