Backup & Restore MariaDB without a staging path using Streaming

In this approach Zmanda Pro is configured to trigger the Mariabackup and stream the backup directly as a compressed file to the Storage Vault without using an intermediate staging area.

Configure a Program Output Protected Item

Configure a Program Output Protected Item

Items Tab

Configure the Command to mariabackup backup command with the mbstream utility. This would instruct the mariabackup to write the output of the command to the Standard Output

mariabackup --backup --stream=mbstream --user=<backup-user> --password='<password>' > /dev/null 2>&1

Configure the Save As to use an appropriate name like backup.tar.gz

Configure the Command to use mbstream and set the Save As backup.tar

Save

After saving the configuration you should see a Program Output protecte item ready for your first backup.

Run Backup for the Mariabackup using Program Output Protected Item

You can configure schedules and retention periods similar to any other protected item.

Restore & Recovery

The Restore process involves retrieving the backed-up data from the backup storage (in this case, Zmanda Pro) and placing it in a specified location on the target system. The restored file would be restored as a compressed archive.

The Recovery process takes the restored data and prepares it for use by MariaDB. This involves several important steps to ensure data consistency and make it ready for the MariaDB server to use. This is a manual process.

This process is similar to a Program Input restore.

  1. Navigate to the Devices Tab of the MariaDB server's Zmanda Pro user

  2. Click on the Actions and select Restore

  3. Select the appropriate Storage Vault to restore from

  4. Expand the Device name and Select the Protected Item name

  5. Make sure All items is selected for restore

  6. Select Restore as - Program Input

  7. Provide Command to extract the tar archive into the desired directory

  8. Select Process multiple files using for the Archive option

  9. Click on Restore

Recovery

  1. Navigate to Output Directory

cd /path/to/output/directory
  1. Prepare the MariaDB target directory

mariabackup --prepare --target-dir=/path/to/output/directory
  1. Remove MariaDB data directory

  2. Recovering the restored files back

mariabackup --copy-back --datadir=/path/to/data/directory --target-dir=/path/to/output/directory
  1. Update the ownership of Data Directory to mysql

chown mysql:mysql /path/to/data/directory

Last updated