The trepctl backup command performs a backup of the corresponding database for the selected service.
trepctl backup [
-backup agent ] [
-limit s ] [
-storage agent ]
Table 7.23. trepctl backup Command Options
Without specifying any options, the backup uses the default configured backup and storage system, and will wait indefinitely until the backup process has been completed:
trepctl backupBackup completed successfully; URI=storage://file-system/store-0000000002.properties
The return information gives the URI of the backup properties file. This
information can be used when performing a restore operation as the
source of the backup. See
Section 22.214.171.124, “trepctl restore Command”. Different
backup solutions may require that the replicator be placed into the
OFFLINE state before the backup is
A log of the backup operation will be stored in the replicator log
directory, in a file corresponding to the backup tool used (e.g.
trepctl backup -backup mysqldump
If multiple storage agents have been configured, the storage agent can
be selected using the
trepctl backup -storage file
A backup will always be attempted, but the timeout to wait for the
backup to be started during the command-line session can be specified
-limit option. The
default is to wait indefinitely. However, in a scripted environment you
may want to request the backup and continue performing other operations.
-limit option specifies
how long trepctl should wait before returning.
For example, to wait five seconds before returning:
trepctl -service alpha backup -limit 5Backup is pending; check log for status
The backup request has been received, but not completed within the allocated time limit. The command will return. Checking the logs shows the timeout:
... management.OpenReplicatorManager Backup request timed out: seconds=5
Followed by the successful completion of the backup, indicated by the URI provided in the log showing where the backup file has been stored.
... backup.BackupTask Storing backup result... ... backup.FileSystemStorageAgent Allocated backup location: » uri =storage://file-system/store-0000000003.properties ... backup.FileSystemStorageAgent Stored backup storage file: » file=/opt/continuent/backups/store-0000000003-mysqldump_2013-07-15_18-14_11.sql.gz length=0 ... backup.FileSystemStorageAgent Stored backup storage properties: » file=/opt/continuent/backups/store-0000000003.properties length=314 ... backup.BackupTask Backup completed normally: » uri=storage://file-system/store-0000000003.propertiess
The URI can be used during a restore.