Documentation Home
MySQL Cluster Manager 1.4 User Manual
Related Documentation Download this Manual
PDF (US Ltr) - 1.8Mb
PDF (A4) - 1.8Mb


4.7.3 The list backups Command

list backups [{--backupid=|-I }backup_id] [-all|-a] cluster_name

list backups [{--backupid=|-I }backup_id] [--agent|-A] site_name

Without the --agent option, the command lists all backups of the MySQL NDB Cluster named cluster_name that are known to this instance of MySQL Cluster Manager. The output includes the backup and node ID as well as a UTC timestamp for each backup, as shown here:

mcm> list backups mycluster;
+----------+--------+---------+----------------------+---------+
| BackupId | NodeId | Host    | Timestamp            | Comment |
+----------+--------+---------+----------------------+---------+
| 1        | 1      | tonfisk | 2016-10-24 22:24:54Z |         |
| 1        | 2      | tonfisk | 2016-10-24 22:24:54Z |         |
| 2        | 1      | tonfisk | 2016-10-24 22:24:54Z |         |
| 2        | 2      | tonfisk | 2016-10-24 22:24:54Z |         |
+----------+--------+---------+----------------------+---------+
4 rows in set (0.02 sec)

The Timestamp column shows the timestamp (in UTC) of the first file to appear in any backup instance folder. There are 3 files in each backup fileset: *.ctl, *.data, and *.log. If the backup instance folder is empty, the timestamp of the folder itself is shown.

With the --backupid option used, the commands only list backups with the specified ID:

mcm> list backups --backupid=2 mycluster;
+----------+--------+---------+----------------------+---------+
| BackupId | NodeId | Host    | Timestamp            | Comment |
+----------+--------+---------+----------------------+---------+
| 2        | 1      | tonfisk | 2016-10-24 22:24:54Z |         |
| 2        | 2      | tonfisk | 2016-10-24 22:24:54Z |         |
+----------+--------+---------+----------------------+---------+
2 rows in set (0.02 sec)

For MySQL Cluster Manager 1.4.1 and later: The backup cluster command also creates backups of the metadata for a cluster's NDB tables, which are listed by the list backups command when the --all option is used. The metadata backups are marked by the comment Schema in the backup listing:

mcm> list backups --all newcluster;
+----------+--------+---------+----------------------+---------+
| BackupId | NodeId | Host    | Timestamp            | Comment |
+----------+--------+---------+----------------------+---------+
| 1        | 1      | tonfisk | 2016-08-12 16:55:52Z |         |
| 1        | 2      | tonfisk | 2016-08-12 16:55:52Z |         |
| 1        | 3      | tonfisk | 2016-08-12 16:55:52Z |         |
| 1        | 4      | tonfisk | 2016-08-12 16:55:52Z |         |
| 1        | 50     | tonfisk | 2016-08-12 16:55:55Z | Schema  |
+----------+--------+---------+----------------------+---------+
5 rows in set (0.02 sec)

See Logical Backup for NDB Table Metadata for details about the metadata backup.

For MySQL Cluster Manager 1.4.6 and later: When the --agent option is used and a site_name is specified, the command lists agent backups created for a specific site:

mcm> list backups --agent mysite;
+------------+-------+---------+----------------------+---------+
| BackupId   | Agent | Host    | Timestamp            | Comment |
+------------+-------+---------+----------------------+---------+
| 1522914101 | 0     | tonfisk | 2018-04-05 07:41:41Z |         |
| 1522914105 | 0     | tonfisk | 2018-04-05 07:41:45Z |         |
| 1522914121 | 0     | tonfisk | 2018-04-05 07:42:01Z |         |
+------------+-------+---------+----------------------+---------+
3 rows in set (0.00 sec)

The backup IDs reflect the Unix Epoch times at which the backups were taken.

The output can be filtered with the --backupid option:

mcm> list backups --agent --backupid=1522914121 mysite;
+------------+-------+---------+----------------------+---------+
| BackupId   | Agent | Host    | Timestamp            | Comment |
+------------+-------+---------+----------------------+---------+
| 1522914121 | 0     | tonfisk | 2018-04-05 07:42:01Z |         |
+------------+-------+---------+----------------------+---------+
1 row in set (0.07 sec)