Starfox wrote:
First time around, create a snapshot and send it to remote: zfs snapshot
master/[EMAIL PROTECTED] zfs send master/[EMAIL PROTECTED] | ssh mirror zfs recv
backup/mirrorfs
Once that's done, [EMAIL PROTECTED], correct?
More accurately, master/[EMAIL PROTECTED] == backup/[EMAIL PROTECTED]
> So now I'm running the script manually
and it's complaining that the incremental source doesn't match, and
apparently no way to tell which [EMAIL PROTECTED] is the source short of
trial-and-error even if I kept all my incremental mirrors? Is there a
clean way around this?
I'd say either (a) have your script check to see if the send|recv was
successful, or (b) have it check what snapshots are available at the other
side, and start sending incrementals from there. Eg:
$lastsnap = ssh remote zfs list -o name $fs | tail -1 | cut '@' ...
do {
zfs snapshot [EMAIL PROTECTED]
zfs send -i $lastsnap [EMAIL PROTECTED] | ssh remote zfs recv -d
pool/recvd
} while (no errors)
I guess a better scenario would be that I accidentally destroyed the last
[EMAIL PROTECTED] (so no source snapshot to -i). Would my only recourse it to
bite the bullet and do a zfs send [EMAIL PROTECTED] (aka full)?
No, if you have the old snaps on both sides, you can simply send an
incremental from the last common snap (eg, zfs send -i mirrorX-1 [EMAIL PROTECTED])
Another question is if I wanted to send a snapshot as a snapshot, I can
do: zfs snapshot master/[EMAIL PROTECTED] zfs send master/[EMAIL PROTECTED] |
ssh
mirror zfs recv backup/[EMAIL PROTECTED]
And now [EMAIL PROTECTED]@savesnap, right? But that would involve
sending the whole stream, which is however much data the filesystem was
consuming at that point in time?
Yes. But this will create a new filesystem backup/mirrorfs on the receiving
side. I'm not sure I understand your goal -- zfs send always sends a
snapshot, whether incremental or full.
--matt
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss