[OmniOS-discuss] zfs send | recv
priyadarshan
priyadarshan at scs.re
Mon Jun 11 07:46:25 UTC 2018
> On 11 Jun 2018, at 09:11, Oliver Weinmann <oliver.weinmann at telespazio-vega.de> wrote:
>
> Hi,
>
> We are replicating snapshots from a Nexenta system to an OmniOS system. Nexenta calls this feature autosync. While they say it is only 100% supported between nexenta systems, we managed to get it working with OmniOS too. It’s Not rocket science. But there is one big problem. In the autosync job on the Nexenta system one can specify how many snaps to keep local on the nexenta and how many to keep on the target system. Somehow we always have the same amount of snaps on both systems. Autosync always cleans all snaps on the dest that don’t exist on the source. I contacted nexenta support and they told me that this is due to different versions of zfs send and zfs recv. There should be a –K flag, that instructs the destination to not destroy snapshots that don't exist on the source. Is such a flag available in OmniOS? I assume the flag is set on the sending side so that the receiving side has to understand it.
>
> Best Regards,
> Oliver
>
Hello,
OmniOS devs please correct me if mistaken, I believe OmniOS faithfully tracks zfs from illumos-gate.
One can follow various upstream merges here:
https://github.com/omniosorg/illumos-omnios/pulls?q=is%3Apr+is%3Aclosed
Based on that, illumos man pages also apply to OmniOS: https://omnios.omniti.com/wiki.php/ManSections
Illumos zfs man page is here: https://illumos.org/man/1m/zfs
That page does not seem to offer a -K flag.
You may want to consider third party tools.
We have a very similar use-case as you detailed, fulfilled by using zfsnap, with reliable and consistent results.
git repository: https://github.com/zfsnap/zfsnap
site: http://www.zfsnap.org/
man page: http://www.zfsnap.org/zfsnap_manpage.html
With zfsnap we have been maintaining (almost) live replicas of mail servers, including snapshotting, either automatically synchronised to master, or kept aside for special needs.
One just needs to tweak a shell script (or simply, one or more cron jobs) to what is desired.
Priyadarshan
More information about the OmniOS-discuss
mailing list