The znapzendzetup script is used to create, edit, and view the backup plans for a given dataset. To view a backup plan, you can use the list command, like this:
znapzendzetup list m10-1/vol1
This produces the following output:
*** backup plan: m10-1/vol1 *** dst-a = root@v490:datatel/vol1 dst-a-plan = 7days=>1day,2months=>1week,1year=>1month dst-b = datatel@ist-25:rpool/datatel/vol1 dst-b-plan = 7days=>1day,2months=>1week,1year=>1month enabled = on mbuffer = /opt/csw/bin/mbuffer:31372 mbuffersize = 1G postznapcmd = /usr/ud73/bin/dbresume preznapcmd = /usr/ud73/bin/dbpause recursive = off src = m10-1/vol1 src-plan = 7days=>1day,2months=>1week tsformat = %Y-%m-%d-%H%M%S
The list above tells us that there are three backup plans -- one on the source dataset, which is just snapshots, and copies of those snapshots that are sent to two destinations v490 and ist-25. The snapshots on the source are taken once a day and kept for one week, and once a week kept for two months. The destination snapshots also have a monthly snapshot that is kept for a year.
Another item of interest are the pre- and post-snapshot commands. In this case, they are the commands to pause the Unidata database while the snapshots complete, and restart the database when they're done.
We can also see that the plan is to use mbuffer to transmit data on port 31372. The mbuffer binary allows znapzend to send and receive data faster and more reliably than is the case with ssh.
Finally, we can see that the tsformat option specifies the format of the timestamp that will be used on each snapshot.
Editing the above list would be done with a command like:
znapzenzetup edit m10-1/vol1
This would just bring up the same text, but in a text editor. To create the above backup plan, you might try a command like:
znapzendzetup create --mbuffer=/opt/csw/bin/mbuffer:31372 \ --mbuffersize=1G --tsformat='%Y-%m-%d-%H%M%S' \ --pre-snap-command="/usr/ud73/bin/dbpause" \ --post-snap-command="/usr/ud73/bin/dbresume" \ SRC '7d=>1d,2m=>1w' m10-1/vol1 \ DST:a '7d=>1d,2m=>1w,1y=>1m' root@v490:datatel/vol1 \ DST:b '7d=>1d,2m=>1w,1y=>1m' root@ist-25:rpool/datatel/vol1 This specifies the location of the mbuffer command in /opt/csw/bin as well as all of the other attributes.
It's also possible to import and export backup plans using znapzendzetup. This would be a good idea when cloning a Colleague environment, so that you wouldn't have to recreate the backup plan. The commands might look like this:
znapzendzetup export m10-1/development > /root/devbackupplan zfs destroy m10-1/development zfs clone -o mountpoint=/datatel/coll18/development m10-1/production@20170608devclone m10-1/development znapzendzetup import --write m10-1/development /root/devbackupplan