You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In regards to the documentation, the variables ZNAP_NAME and ZNAP_TIME are defined by:
--pre-snap-command=/path/bin args, --post-snap-command=/path/bin args
Run commands/scripts before and after snapshots are taken on source. e.g. for database locking/flushing (pre) and unlocking (post).
The pre and post snapshot commands can find the name and time of the snapshot in the environment variables ZNAP_NAME and ZNAP_TIME.
Am I able to send ZNAP_NAME and ZNAP_TIME to scripts running with the pre-send/post-send commands?:
pre-send-command=/path/bin args, post-send-command=/path/bin args
Run command/script before and after sending the snapshot to the destination
The text was updated successfully, but these errors were encountered:
Now git grep ZNAP_ only found me one hit for each:
$ git grep ZNAP_
CHANGES.old: document ZNAP_* environement variables (#277)
bin/znapzendzetup:snapshot in the environment variables I<ZNAP_NAME> and I<ZNAP_TIME>.
doc/znapzendzetup.pod:snapshot in the environment variables I<ZNAP_NAME> and I<ZNAP_TIME>.
lib/ZnapZend.pm: local $ENV{ZNAP_NAME} = $snapshotName;
lib/ZnapZend.pm: local $ENV{ZNAP_TIME} = $timeStamp;
lib/ZnapZend.pm: delete $ENV{ZNAP_NAME};
lib/ZnapZend.pm: delete $ENV{ZNAP_TIME};
man/znapzendzetup.1:snapshot in the environment variables \fI\s-1ZNAP_NAME\s0\fR and \fI\s-1ZNAP_TIME\s0\fR.
Those assignments and deletions happen in my $createSnapshot = sub {... definition.
You can try copying them to $refreshBackupPlans and/or $sendRecvCleanup definitions (search for [Pp](re|ost).*[Ss]end regex); they already deal with $ENV{WORKER} (actually can just search for it), so add copies of those lines nearby.
If it works, I suppose a PR would be welcomed by @oetiker :)
In regards to the documentation, the variables ZNAP_NAME and ZNAP_TIME are defined by:
Am I able to send ZNAP_NAME and ZNAP_TIME to scripts running with the pre-send/post-send commands?:
The text was updated successfully, but these errors were encountered: