1. Home
  2. Docs
  3. Backup Ninja
  4. How-To
  5. Scheduling
  6. MySQL Server/Percona Server/MariaDB Server

MySQL Server/Percona Server/MariaDB Server

Backup Ninja supports the following backup tools for MySQL-based servers:

Backup Tool Type Definition
mysqldump Logical It performs logical backups, producing a set of SQL statements that can be executed to reproduce the original database object definitions and table data.
Percona XtraBackup Physical It is an open-source tool for performing physical backups of MySQL, MariaDB, and Percona Server databases. It performs online non-blocking, tightly compressed, and secure full backups on transactional systems so that applications remain fully available for the duration of the backup window.
MariaDB Backup Physical It is an open-source tool provided by MariaDB for performing physical online backups. It is a fork of Percona XtraBackup designed to work with encrypted and compressed tables and is the recommended backup method for MariaDB databases.
Note

MariaDB Backup (mariabackup) is only available for the MariaDB server.

Full logical backup using mysqldump

From the Backup Ninja dashboard, go to Schedules → Add Schedule and follow the configuration wizard.

1) Details

  • Enter the name of the schedule: bkp_mysqldump
  • Select a database server and the backup method to use: mysqldump
Note

Only installed backup tools on the selected server will be listed.

2) Storages

Where the backup will be stored. Select Add New Storage → Add Local Storage.

  • Add a storage name: <strong>local_storage</strong>
  • Specify a local storage directory: <strong>/backups/</strong>
  • And a retention policy: <strong>Days - 7</strong>
Note

You can also store the backup on a cloud provider using the cloud storage option.

3) Settings

Customize the file name pattern of the backup files:

%B - YYYY-MM-DD_HHmmss
%D - database name (schema)
%H - server hostname
%I - backup job number
%M - backup method used

You can use compression (Gzip by default) and encryption (AES 256-bit OFB by default). If you enable encryption, a new window with two options will appear:

You can use the autogenerated key or you can use a custom one. For the custom key, keep in mind that the encryption key needs to be 64 hexadecimal (case-insensitive) characters.

Note

You will need the encryption key to restore the backup, so make sure to save the key in a secure place.

4) Schedule

Configure when the backup will be executed:

Note

Backups will be scheduled to run based on the database server’s timezone setting.

Full physical backup using Percona Xtrabackup/MariaDB Backup

From the Backup Ninja dashboard, go to Schedules → Add Schedule and follow the configuration wizard.

1) Details

  • Enter the name of the schedule: <strong>bkp_mariabackup</strong>
  • Select a database server and the backup method to use: <strong>mariabackup</strong>
Note

Only installed backup tools on the selected server will be listed.

2) Storages

Where the backup will be stored. Select Add New Storage → Add Local Storage:

  • Add a storage name: <strong>local_storage</strong>
  • Specify a local storage directory: <strong>/backups/</strong>
  • And a retention policy: <strong>Days - 7</strong>
Note

You can also store the backup on a cloud provider using the cloud storage option.

3) Settings

Specify the name pattern to use for the backup files:

%B - YYYY-MM-DD_HHmmss
%D - database name (schema)
%H - server hostname
%I - backup job number
%M - backup method used

You can use compression (Gzip by default) and encryption (AES 256-bit OFB by default). If you enable encryption, a new window with the encryption key will be shown:

Note

You will need the encryption key to restore the backup, so make sure you save the key in a secure place.

4) Schedule

Schedule when the backup will be executed:

Note

Backups will be scheduled to run based on the database servers timezone setting.

Was this article helpful to you? Yes No