Provide snapshot hook for daily_checkpoint.sh.
Perhaps the most common SDP customization is a tweak to integrate
the SDP checkpoint mechanism with site-local capability of the
underlying hardware, so that the snapshot is created at the ideal
point in time, right after the metadata checkpoint is created.
The intent of this change is to reduce the need for such
customization by making a well defined hook in the daily checkpoint
process for calling a site-specific custom checkpoint script.
Key elements:
* Made an illustrative sample change to instance_vars.template,
to show setting a SNAPSHOT_SCRIPT variable defined only if
running on the master. This logic would be customized to meet
local needs, e.g. perhaps checking hostname if snapshots can
only be run on certiain machines. The custom logic would live
in the /p4/common/config/p4_N.vars file. As a for-example,
The sample logic shows a commented-out call to an Amazon Web
Services (AWS) Elastic Block Store (EBS) snapshot. (This could
just as easily reference a NetApp filer snapshot for an on-prem
installation.)
* A change to dump_checkpoint() in backup_functions.sh to
call the snapshot script defined by the $SNAPSHOT_SCRIPT variable
if defined.
As coded, a failure of either the checkpoint or the snapshot
will cause the script to report a failure. However, a failure
of the checkpoint will not prevent the snapshot from being
attempted.
Possible future tweaks: Consider adding a LIMIT_ONE_DAILY_SNAPSHOT
setting (akin to the LIMIT_ONE_DAILY_CHECKPOINT setting in the
Windows SDP).