On 09/13/12 07:44 AM, Edward Ned Harvey
(opensolarisisdeadlongliveopensolaris) wrote:
I send a replication data stream from one host to another. (and receive).
I discovered that after receiving, I need to remove the auto-snapshot
property on the receiving side, and set the readonly property on the
receiving side, to prevent accidental changes (including auto-snapshots.)
Question #1:Actually, do I need to remove the auto-snapshot on the
receiving side?Or is it sufficient to simply set the readonly
property?Will the readonly property prevent auto-snapshots from occurring?
So then, sometime later, I want to send an incremental replication
stream.I need to name an incremental source snap on the sending
side...which needs to be the latest matching snap that exists on both
sides.
Question #2:What's the best way to find the latest matching snap on
both the source and destination?At present, it seems, I'll have to
build a list of sender snaps, and a list of receiver snaps, and parse
and search them, till I find the latest one that exists in both.For
shell scripting, this is very non-trivial.
That's pretty much how I do it. Get the two (sorted) sets of snapshots,
remove those that only exist on the remote end (ageing) and send those
that only exist locally. The first incremental pair will be the last
common snapshot and the first unique local snapshot.
I haven't tried this in a script, but it's quite straightforward in C++
using the standard library set container and algorithms.
--
Ian.
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss