mariadb-backup and BACKUP STAGE Commands
mariadb-backup and BACKUP STAGE Commands
<<<<<<< HEAD
The [BACKUP STAGE](../../../reference/sql-statements-and-structure/sql-statements/administrative-sql-statements/backup-commands/backup-stage.md)
commands are a set of commands to make it possible to make an efficient external backup tool. How mariadb-backup uses these commands depends on whether you are using the version that is bundled with MariaDB Community Server or the version that is bundled with MariaDB Enterprise Server.
[BACKUP STAGE](../../../reference/sql-statements-and-structure/sql-statements/administrative-sql-statements/backup-commands/backup-stage.md)
commands are a set of commands to make it possible to make an efficient external backup tool. How mariadb-backup uses these commands depends on whether you are using the version that is bundled with MariaDB Community Server or the version that is bundled with MariaDB Enterprise Server.The BACKUP STAGE commands are a set of commands to make it possible to make an efficient external backup tool. How Mariabackup uses these commands depends on whether you are using the version that is bundled with MariaDB Community Server or the version that is bundled with MariaDB Enterprise Server.
2f4a7af992d60113345320299a7c689ee31815c1
mariadb-backup and BACKUP STAGE
Commands in MariaDB Community Server
BACKUP STAGE
Commands in MariaDB Community Server<<<<<<< HEAD
The [BACKUP STAGE](../../../reference/sql-statements-and-structure/sql-statements/administrative-sql-statements/backup-commands/backup-stage.md)
commands are supported. However, the version of mariadb-backup that is bundled with MariaDB Community Server does not yet use the [BACKUP STAGE](../../../reference/sql-statements-and-structure/sql-statements/administrative-sql-statements/backup-commands/backup-stage.md)
commands in the most efficient way. mariadb-backup simply executes the following [BACKUP STAGE](../../../reference/sql-statements-and-structure/sql-statements/administrative-sql-statements/backup-commands/backup-stage.md)
commands to lock the database:
[BACKUP STAGE](../../../reference/sql-statements-and-structure/sql-statements/administrative-sql-statements/backup-commands/backup-stage.md)
commands are supported. However, the version of mariadb-backup that is bundled with MariaDB Community Server does not yet use the [BACKUP STAGE](../../../reference/sql-statements-and-structure/sql-statements/administrative-sql-statements/backup-commands/backup-stage.md)
commands in the most efficient way. mariadb-backup simply executes the following [BACKUP STAGE](../../../reference/sql-statements-and-structure/sql-statements/administrative-sql-statements/backup-commands/backup-stage.md)
commands to lock the database:The BACKUP STAGE commands are supported. However, the version of Mariabackup that is bundled with MariaDB Community Server does not yet use the BACKUP STAGE commands in the most efficient way. Mariabackup simply executes the following BACKUP STAGE commands to lock the database:
2f4a7af992d60113345320299a7c689ee31815c1
BACKUP STAGE START;
BACKUP STAGE BLOCK_COMMIT;
When the backup is complete, it executes the following BACKUP STAGE command to unlock the database:
BACKUP STAGE END;
<<<<<<< HEAD
If you would like to use a version of mariadb-backup that uses the [BACKUP STAGE](../../../reference/sql-statements-and-structure/sql-statements/administrative-sql-statements/backup-commands/backup-stage.md)
commands in the most efficient way, then your best option is to use MariaDB Backup that is bundled with MariaDB Enterprise Server.
[BACKUP STAGE](../../../reference/sql-statements-and-structure/sql-statements/administrative-sql-statements/backup-commands/backup-stage.md)
commands in the most efficient way, then your best option is to use MariaDB Backup that is bundled with MariaDB Enterprise Server.If you would like to use a version of Mariabackup that uses the BACKUP STAGE commands in the most efficient way, then your best option is to use MariaDB Backup that is bundled with MariaDB Enterprise Server.
2f4a7af992d60113345320299a7c689ee31815c1
Tasks Performed Prior to BACKUP STAGE
in MariaDB Community Server
BACKUP STAGE
in MariaDB Community ServerCopy some transactional tables.
InnoDB (i.e.
ibdataN
and file extensions.ibd
and.isl
)
Copy the tail of some transaction logs.
The tail of the InnoDB redo log (i.e.
ib_logfileN
files) will be copied for InnoDB tables.
BACKUP STAGE START
in MariaDB Community Server
BACKUP STAGE START
in MariaDB Community Servermariadb-backup from MariaDB Community Server does not currently perform any tasks in the START
stage.
BACKUP STAGE FLUSH
in MariaDB Community Server
BACKUP STAGE FLUSH
in MariaDB Community Servermariadb-backup from MariaDB Community Server does not currently perform any tasks in the FLUSH
stage.
BACKUP STAGE BLOCK_DDL
in MariaDB Community Server
BACKUP STAGE BLOCK_DDL
in MariaDB Community Servermariadb-backup from MariaDB Community Server does not currently perform any tasks in the BLOCK_DDL
stage.
BACKUP STAGE BLOCK_COMMIT
in MariaDB Community Server
BACKUP STAGE BLOCK_COMMIT
in MariaDB Community Servermariadb-backup from MariaDB Community Server performs the following tasks in the BLOCK_COMMIT
stage:
Copy other files.
i.e. file extensions
.frm
,.isl
,.TRG
,.TRN
,.opt
,.par
Copy some transactional tables.
Aria (i.e.
aria_log_control
and file extensions.MAD
and.MAI
)
Create a MyRocks checkpoint using the rocksdb_create_checkpoint system variable.
Copy the tail of some transaction logs.
The tail of the InnoDB redo log (i.e.
ib_logfileN
files) will be copied for InnoDB tables.
Save the binary log position to xtrabackup_binlog_info.
Save the Galera Cluster state information to xtrabackup_galera_info.
BACKUP STAGE END
in MariaDB Community Server
BACKUP STAGE END
in MariaDB Community Servermariadb-backup from MariaDB Community Server performs the following tasks in the END
stage:
Copy the MyRocks checkpoint into the backup.
mariadb-backup and BACKUP STAGE
Commands in MariaDB Enterprise Server
BACKUP STAGE
Commands in MariaDB Enterprise Server<<<<<<< HEAD
The following sections describe how the MariaDB Backup version of mariadb-backup that is bundled with MariaDB Enterprise Server uses each [BACKUP STAGE](../../../reference/sql-statements-and-structure/sql-statements/administrative-sql-statements/backup-commands/backup-stage.md)
command in an efficient way.
[BACKUP STAGE](../../../reference/sql-statements-and-structure/sql-statements/administrative-sql-statements/backup-commands/backup-stage.md)
command in an efficient way.The following sections describe how the MariaDB Backup version of Mariabackup that is bundled with MariaDB Enterprise Server uses each BACKUP STAGE command in an efficient way.
2f4a7af992d60113345320299a7c689ee31815c1
BACKUP STAGE START
in MariaDB Enterprise Server
BACKUP STAGE START
in MariaDB Enterprise Servermariadb-backup from MariaDB Enterprise Server performs the following tasks in the START
stage:
Copy the tail of all transaction logs.
The tail of the InnoDB redo log (i.e.
ib_logfileN
files) will be copied for InnoDB tables.The tail of the Aria redo log (i.e.
aria_log.N
files) will be copied for Aria tables.
BACKUP STAGE FLUSH
in MariaDB Enterprise Server
BACKUP STAGE FLUSH
in MariaDB Enterprise Servermariadb-backup from MariaDB Enterprise Server performs the following tasks in the FLUSH
stage:
Copy all non-transactional tables that are not in use. This list of used tables is found with SHOW OPEN TABLES.
Copy the tail of all transaction logs.
The tail of the InnoDB redo log (i.e.
ib_logfileN
files) will be copied for InnoDB tables.The tail of the Aria redo log (i.e.
aria_log.N
files) will be copied for Aria tables.
BACKUP STAGE BLOCK_DDL
in MariaDB Enterprise Server
BACKUP STAGE BLOCK_DDL
in MariaDB Enterprise Servermariadb-backup from MariaDB Enterprise Server performs the following tasks in the BLOCK_DDL
stage:
Copy other files.
i.e. file extensions
.frm
,.isl
,.TRG
,.TRN
,.opt
,.par
Check
ddl.log
for DDL executed before theBLOCK DDL
stage.The file names of newly created tables can be read from
ddl.log
.The file names of dropped tables can also be read from
ddl.log
.The file names of renamed tables can also be read from
ddl.log
, so the files can be renamed instead of re-copying them.
Copy changes to system log tables.
This is easy as these are append only.
Copy the tail of all transaction logs.
The tail of the InnoDB redo log (i.e.
ib_logfileN
files) will be copied for InnoDB tables.The tail of the Aria redo log (i.e.
aria_log.N
files) will be copied for Aria tables.
BACKUP STAGE BLOCK_COMMIT
in MariaDB Enterprise Server
BACKUP STAGE BLOCK_COMMIT
in MariaDB Enterprise Servermariadb-backup from MariaDB Enterprise Server performs the following tasks in the BLOCK_COMMIT
stage:
Create a MyRocks checkpoint using the rocksdb_create_checkpoint system variable.
Copy changes to system log tables.
This is easy as these are append only.
Copy changes to statistics tables.
Copy the tail of all transaction logs.
The tail of the InnoDB redo log (i.e.
ib_logfileN
files) will be copied for InnoDB tables.The tail of the Aria redo log (i.e.
aria_log.N
files) will be copied for Aria tables.
Save the binary log position to xtrabackup_binlog_info.
Save the Galera Cluster state information to xtrabackup_galera_info.
BACKUP STAGE END
in MariaDB Enterprise Server
BACKUP STAGE END
in MariaDB Enterprise Servermariadb-backup from MariaDB Enterprise Server performs the following tasks in the END
stage:
Copy the MyRocks checkpoint into the backup.
This page is licensed: CC BY-SA / Gnu FDL
Last updated
Was this helpful?