To enable a custom backup script, the installation must be updated through tpm to use the script backup method. To update the configuration:
Create or copy the backup script into a suitable location, for example
/opt/continuent/share
.
Copy the script to each of the datasources within your dataservice.
Update the configuration using tpm. The
--repl-backup-method
should be set to
script
, and the directory
location set using the
--repl-backup-script
option:
shell> ./tools/tpm update --repl-backup-method=script \
--repl-backup-script=/opt/continuent/share/mcbackup.pl \
--repl-backup-online=true
The --repl-backup-online
option
indicates whether the backup script operates in online or offline
mode. If set to false, replicator must be in the offline state because
the backup process is started.
To pass additional arguments or options to the script, use the
replicator.backup.agent.script.options
property to supply a list of ampersand separate key/value pairs, for
example:
--property=replicator.backup.agent.script.options="arg1=val1&myarg=val2"
These are the custom parameters which are supplied to the script as
the value of the -options
parameter when the script is called.
Once the backup script has been enabled within the configuration it can be used when performing a backup through the standard backup or restore interface:
For example, within cctrl:
[LOGICAL:EXPERT] /alpha > datasource host2 backup script
Note that the name of the backup method is
script
, not the actual name of the
script being used.