

You must stop the MariaDB Server before running this command. Using this command, Mariabackup copies the backup from the target directory to the data directory, as defined by the -datadir option. Restores the backup to the data directory. To further configure backup compression, see the -compress and -compress-chunk-size options. $ mariabackup -compress -compress-threads=12 -backup You may find this useful in speeding up the compression of particularly large databases. Using this option, you can define the number of threads you want to use for this operation. Mariabackup can perform compression operations on the backup files before writing them to disk. $ mariabackup -close-files -prepareĭeprecated, for details see the -compress option.ĭefines the number of threads to use in compression. However, it can also lead to inconsistent backups.

When working with particularly large tablespaces, closing the file can make the backup more manageable. Without this option, Mariabackup keeps files open in order to manage DDL operations. Using this option, you can tell Mariabackup that you want to close file handles. close-filesĭefines whether you want to close file handles. If you attempt to run Mariabackup with this option, then it causes the utility to exit with an error. See the description of the xtrabackup_binlog_pos_innodb file for more information. $ mariabackup -binlog-info -backupĬurrently, the LOCKLESS option depends on features unsupported by MariaDB Server. You may find this useful when you need to copy data without metadata like the binlog or replication coordinates. When disabled with OFF, Mariabackup runs without attempting to retrieve binary log information. When enabled, whether using ON or AUTO, Mariabackup retrieves information from the binlog during the backup process. Using this option, you can control how Mariabackup retrieves the server's binary log coordinates corresponding to the backup. When no retrieval method is provided, it defaults to AUTO.ĭisables the retrieval of binary log informationĮnables the retrieval of binary log information, performs locking where available to ensure consistencyĮnables the retrieval of binary log information using ON or LOCKLESS where supported The -binlog-info option supports the following retrieval methods. binlog-infoĭefines how Mariabackup retrieves the binary log coordinates from the server.
#Backing up to debug only private cache full
Then you can run Mariabackup again with either the -copy-back or -move-back commands to restore the database.įor more information, see Full Backup and Restore and Incremental Backup and Restore. In order to restore from a backup, you first need to run Mariabackup with the -prepare command option, to make a full backup point-in-time consistent or to apply incremental backup deltas to base. An incremental backup checks the database against a previously taken full backup, (defined by the -incremental-basedir option) and creates delta files for these changes. A full backup creates a snapshot of the database in the target directory. Mariabackup can perform full and incremental backups. The backups are written to the target directory, as set by the -target-dir option. Using this command option, Mariabackup performs a backup operation on your database or databases. In MariaDB 10.2 and later, this option is not needed or supported. This option is only supported in MariaDB 10.1. This option is used with incremental backups. If this option is used when preparing a backup, then only the redo log apply stage will be performed, and other stages of crash recovery will be ignored. Once the backup is ready, you can use the -copy-back or the -move-back commands to restore the backup to the server.
#Backing up to debug only private cache update
When working with incremental backups, you need to use the -prepare command and the -incremental-dir option to update the base backup with the deltas from an incremental backup. Running Mariabackup with the -prepare command readies the data so you can restore it to MariaDB Server.

If you try to restore the database without first preparing the data, InnoDB rejects the new data as corrupt. In the case of full backups, the files are not point in time consistent, since they were taken at different times.

Before you can restore the data to MariaDB, you first need to prepare the backup. This is only valid in innobackupex mode, which can be enabled with the -innobackupex option.įiles that Mariabackup generates during -backup operations in the target directory are not ready for use on the Server. Prepares an existing backup to restore to the MariaDB Server. There are a number of options available in Mariabackup.
