The cluster_backup command provides a simple mechanism to execute a Tungsten Replicator backup inside of the cluster. It is designed to be called manually or as part of cron. The command should be added to cron on every server. When started, the command will check if the server is the current coordinator for the cluster. If not, the command will exit without an error. This design ensures that the command will only run on one server in the cluster.
The command supports command-line options that allow you to alter how and where the backup is executed.
--agent ] [
--datasource ] [
--directory ] [
-h ] [
-i ] [
--json ] [
--net-ssh-option ] [
-n ] [
--offline-backup String ] [
-q ] [
--require-slave-backup String ] [
--require-automatic-mode String ] [
--validate ] [
Table 8.18. cluster_backup Command-line Options
|The replicator backup agent to use when running the backup, as configured in cctrl|
|Execute the backup against the specified datasource|
|Use this installed Tungsten directory as the base for all operations|
|Display this message|
|Provide return code and logging messages as a JSON object after the script finishes|
|Set the Net::SSH option for remote system calls|
|Put the datasource OFFLINE prior to taking the backup.|
|Require that the backup is taken of a Replica datasource. If this is enabled and there are no Replicas available, no backup will be taken.|
|The script will fail if the cluster is not in the AUTOMATIC policy mode|
|Only run the script validation|
After the command confirms the current server is the coordinator, it will
attempt to find a datasource to backup. Unless
--require-slave-backup has been
disabled, only Replicas that are
will be eligible. If no datasource can be found, the command will exit with
an error. The backup will then be started on the datasource.
The cluster_backup command will wait until the cctrl command has returned before exiting. The cctrl command can return prior to the backup is completed if it takes too long or if there is another error. The tungsten_nagios_backups check or similar should be used to make sure that you always have a recent backup available in the cluster.
The cluster_backup command may also be configured for use in Composite clusters. In this use case, one backup per cluster will be created.
See Section 5.9.2, “Automating Backups” for more information.
crontab -l00 00 * * * /opt/continuent/tungsten/cluster-home/bin/cluster_backup >>/opt/continuent/service_logs/cluster_backup.log 2>&1
All output will be sent to