This is a description of the different stages in Mariabackup, what they do and why they are needed.
Note that a few items are marked with TODO
; these are things we are working on and will be in next version of Mariabackup.
datadir
, looking for InnoDB tablespaces, load the tablespaces (basically, it is an “open” in InnoDB sense) BEGIN For each affected table SELECT 1 from <table> LIMIT 0
Start a dedicated thread in Mariabackup to copy InnoDB redo log (ib_logfile*
).
-–no-lock
parameter. The reason why FLUSH
is needed is to ensure that all tables are in a consistent state at the exact same point in time, independent of storage engine. --lock-ddl-per-table
is used and there is a user query waiting for MDL, the user query will be killed to resolve a deadlock. Note that these are only queries of type ALTER, DROP, TRUNCATE or RENAME TABLE. (MDEV-15636) .frm
, MyISAM
, Aria
and other storage engine files MyRocks
is used, create rocksdb checkpoint via "set rocksdb_create_checkpoint=$rocksdb_data_dir/mariabackup_rocksdb_checkpoint " command. The result of it is a directory with hardlinks to MyRocks files. Copy the checkpoint directory to the backup (or create hardlinks in backup directory is on the same partition as data directory). Remove the checkpoint directory. UNLOCK TABLES
--lock-ddl-per-table
was done: COMMIT
© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/how-mariabackup-works/