Mariabackup and BACKUP STAGE Commands

You are viewing an old version of this article. View the current version here.
MariaDB starting with 10.4.1

The BACKUP STAGE commands were introduced in MariaDB 10.4.1.

The BACKUP STAGE commands are a set of commands to make it possible to make an efficient external backup tool. The version of Mariabackup that is bundled with MariaDB Community Server does not yet use the BACKUP STAGE commands in an efficient way.

If you would like to use a version of Mariabackup that uses the BACKUP STAGE commands in an efficient way, then one option is to use MariaDB Enterprise Backup that is bundled with MariaDB Enterprise Server.

BACKUP STAGE Commands

The following sections describe how Mariabackup *could* theoretically use each BACKUP STAGE commands in an efficient way. This does not necessarily mean that MariaDB Enterprise Backup is currently implemented in this exact way.

BACKUP STAGE START

Mariabackup could perform the following tasks in the START stage:

  • Copy all transactional tables.
  • Copy all transaction logs.
    • The InnoDB redo log will be copied for InnoDB tables.
    • The aria_log_control and aria_log.N files will be copied for Aria tables.

BACKUP STAGE FLUSH

Mariabackup could perform the following tasks in the FLUSH stage:

  • Copy all non-transactional tables that are not in use. This list of used tables can be found with SHOW OPEN TABLES.
  • Copy all transaction logs.
    • The InnoDB redo log will be copied for InnoDB tables.
    • The aria_log_control and aria_log.N files will be copied for Aria tables.

At this point data for all old tables should have been copied (except for some system tables).

BACKUP STAGE BLOCK_DDL

Mariabackup could perform the following tasks in the BLOCK_DDL stage:

  • Copy the non-transactional tables that were in use during STAGE FLUSH.
  • Check ddl.log for DDL executed before the BLOCK 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.
  • Copy all transaction logs.
    • The InnoDB redo log will be copied for InnoDB tables.
    • The aria_log_control and aria_log.N files will be copied for Aria tables.

BACKUP STAGE BLOCK_COMMIT

Mariabackup could perform the following tasks in the BLOCK_COMMIT stage:

BACKUP STAGE END

Mariabackup could perform the following tasks in the END stage:

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.