Creating a Backup
The datasource backup command for a datasource within cctrl backs up a datasource using the default backup tool. During installation,
xtrabackup-full will be used if xtrabackup has been installed. Otherwise, the default backup tool used is mysqldump.
For consistency, all backups should include a copy of all tungsten_SERVICE schemas. This ensures that when the Tungsten Replicator service
is restarted, the correct start points for restarting replication are recorded with the corresponding backup data. Failure to include the
tungsten_SERVICE schemas may prevent replication from being restart effectively.
Backing up a datasource can occur while the replicator is online:
[LOGICAL:EXPERT] /alpha > datasource host3 backup
Using the 'xtrabackup-full' backup agent.
Replicator 'db2' starting backup
Backup of dataSource 'db2' succeeded; uri=storage://file-system/store-0000000001.properties
or:
shell> trepctl backup
Backup completed successfully; URI=storage://file-system/store-0000000003.properties
By default the backup is created on the local filesystem of the host that is backed up in the backups directory of the installation directory. For
example, using the standard installation, the directory would be /opt/continuent/backups . An example of the directory content is shown below:
total 12
-rw-r--r--. 1 tungsten tungsten 71 Jan 31 11:34 storage.index
-rw-r--r--. 1 tungsten tungsten 70 Jan 31 11:34 store-0000000001-full_xtrabackup_2025-01-31_11-34_35
-rw-r--r--. 1 tungsten tungsten 336 Jan 31 11:34 store-0000000001.properties
drwxr-xr-x. 3 tungsten tungsten 49 Jan 31 11:34 xtrabackup
For information on managing backup files within your environment, see "The backups Directory".
The storage.index contains the backup file index information. The actual backup data is stored in the GZipped file (for mysqldump) or the xtrabackup
directory.
The properties of the backup file, including the tool used to create the backup, and the checksum information, are located in the corresponding
.properties file. Note that each backup and property file is uniquely numbered so that it can be identified when restoring a specific backup.
A backup can also be initiated and run in the background by adding the &(ampersand) to the command:
[LOGICAL:EXPERT] /alpha > datasource db2 backup &
[1] datasource db2 backup - RUNNING
[LOGICAL:EXPERT] /alpha > Using the 'xtrabackup-full' backup agent.
Replicator 'db2' starting backup
Backup of dataSource 'db2' succeeded; uri=storage://file-system/store-0000000002.properties
[1] datasource db2 backup - SUCCESS
or:
shell> trepctl backup &
Backup completed successfully; URI=storage://file-system/store-0000000004.properties