USAGE for opt_perforce_sdp_backup.sh v2.1.3:
opt_perforce_sdp_backup.sh [-d|-D]
or
opt_perforce_sdp_backup.sh [-h|-man|-V]
DESCRIPTION:
This script is intended to called by a systemd timer on systems
that support systemd.
There is an opt_perforce_sdp_backup.service for this; it can be
reviewed by doing:
$ systemctl cat opt_perforce_sdp_backup.service
This service is triggered by a systemd timer, which can be viewed by:
$ systemctl cat opt_perforce_sdp_backup.timer
If operating on a system without systemd, then it is OK to call this
directly, e.g. via crontab. It must execute as root.
This script backups key P4 Server Deployment Package (SDP) files and
directories. It does not back up actual P4 Server application data.
The job of this script is to ensure any SDP files that are stored on
the OS root volume are backed up a data volume that is backed up. If
no data volume is found, an extra copy of files is made on the OS root
volume.
The recover_opt_perforce_sdp_from_backup.sh script uses the backup
structure created by this script to rebuild local elements of the SDP.
OPTIONS:
-L <log>
Specify the path to a log file, or the special value 'off' to disable
logging. By default, all output (stdout and stderr) goes to a log file
pointed to by a symlink:
opt_perforce_sdp_backup
The symlink is for convenience. It refers to the log from the most recent
run of the script.
Each time this script is run, a new timestamped log is started, and
the symlink updated to reference the new/latest log during startup. Log
files have timestamps that go to the second (or millisecond if needed)
to differentiate logs.
NOTE: This script is self-logging. Output displayed on the screen is
simultaneously captured in the log file. Using redirection operators like
'> log' or '2>&1' are unnecessary, as is using 'tee' (though using 'tee'
or redirects is safe and harmless).
-d
Display debug messages.
-D
Set extreme debugging verbosity using bash 'set -x' mode. Implies -d.
-si
Silent Mode. No output is displayed to the terminal (except for usage errors
on startup). Output is captured in the log. The '-si' cannot be used with
'-L off'.
HELP OPTIONS:
-h Display short help message.
-man Display man-style help message.
-V Display script name and version.
FILES:
/etc/systemd/system/opt_perforce_sdp_backup.service
/etc/systemd/system/opt_perforce_sdp_backup.timer