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 | Parts | Comment |
+----------+--------+---------+----------------------+-------+---------+
| 1 | 1 | tonfisk | 2016-10-24 22:24:54Z | 1 | |
| 1 | 2 | tonfisk | 2016-10-24 22:24:54Z | 1 | |
| 2 | 1 | tonfisk | 2016-10-24 22:24:54Z | 1 | |
| 2 | 2 | tonfisk | 2016-10-24 22:24:54Z | 1 | |
+----------+--------+---------+----------------------+-------+---------+
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 | Parts | Comment |
+----------+--------+---------+----------------------+-------+---------+
| 2 | 1 | tonfisk | 2016-10-24 22:24:54Z | 1 | |
| 2 | 2 | tonfisk | 2016-10-24 22:24:54Z | 1 | |
+----------+--------+---------+----------------------+-------+---------+
2 rows in set (0.02 sec)
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 | Part | Comment |
+----------+--------+---------+----------------------+------+---------+
| 1 | 1 | tonfisk | 2016-08-12 16:55:52Z | 1 | |
| 1 | 2 | tonfisk | 2016-08-12 16:55:52Z | 1 | |
| 1 | 3 | tonfisk | 2016-08-12 16:55:52Z | 1 | |
| 1 | 4 | tonfisk | 2016-08-12 16:55:52Z | 1 | |
| 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.
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 | Files | Comment |
+------------+-------+---------+----------------------+-------+--------------+
| 1522914101 | 0 | tonfisk | 2018-04-05 07:41:41Z | 5 | Agent backup |
| 1522914105 | 0 | tonfisk | 2018-04-05 07:41:45Z | 5 | Agent backup |
| 1522914121 | 0 | tonfisk | 2018-04-05 07:42:01Z | 5 | Agent backup |
+------------+-------+---------+----------------------+-------+--------------+
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 | Files | Comment |
+------------+-------+---------+----------------------+-------+--------------+
| 1522914121 | 0 | tonfisk | 2018-04-05 07:42:01Z | 5 | Agent backup |
+------------+-------+---------+----------------------+-------+--------------+
1 row in set (0.07 sec)