Backup and Restore for MariaDB ColumnStore 1.1.0 onwards
Backup and Restore for MariaDB ColumnStore 1.1.0 onwards
Backup and Restore package
The Backup and Restore is part of the MariaDB ColumnStore Tools package. It can be downloaded from:
Installing MariaDB ColumnStore Tools package
The package is available as rpm, deb and binary. Follow the instructions to install the associated package:
RPM
DEB
BINARY
Backup Overview
The high level steps involved in performing a full backup of MariaDB ColumnStore are:
Suspend write activity on the system.
Backup the MariaDB Server data files.
Backup the ColumnStore data files.
Resume write activity on the system.
columnstoreBackup
In MariaDB ColumnStore 1.1.0 a tool - columnstoreBackup to automate the backup/restore across the MariaDB ColumnStore nodes is available.
Backup Setup
To run columnstoreBackup you'll need to setup a backup server with passwordless ssh login available for the user account that installed MariaDB ColumnStore. (Default: root). It will need passwordless ssh login to all MariaDB ColumnStore Modules.
Copy the executable columnstoreBackup onto the backup server. Create a target directory on the backup server to store the files. This directory will need to have enough space to store all ColumnStore data files. Example:
There is an optional columnstoreBackup.config file that when placed in the same directory as the columnstoreBackup executable will allow you to configure an incremental backup option that uses the rsync link-dest option to enable incremental backups. These are stored in backup.1 thru backup.[n-1] from newest to oldest. The columnstoreBackup.config file should only contain a single line:
Where "n" is the number of incremental backups to store. (Default: 3)
Running columnstoreBackup
columnstoreBackup must be run as root user either logging in as root or via the sudo command.
Example:
This will execute a backup for the system with a parent OAM module located at 192.168.1.2 and store all backup files inside the directory located at home/user/columnstoreBackupData. Option v will print out a more verbose logging of commands executed and option z will let rsync utilize the compression option for file transfers.
Backup Logging
Logging is output to the console as well as to a columnstoreBackup.log that is located in the directory columnstoreBackup is executed. This will contain some extra details on some issues. Log rotation is left to the user for handling.
Backup Return Codes
Backup Operation Notes
columnstoreBackup will create the following directories inside the Backup Data Directory:
These directories are created if they do not exist and can be created prior to execution by the user.
The columnstoreBackup option -n [value] limits the number parallel rsync commands executed at a given time. The default 5 means up to 5 DBRoots will kick off rysnc commands to various PMs and the backup system will wait until all are complete and verified successful. At this time it will kick off another 5 DBRoots. The progress indicator should reflect the percentage of total completion and not individual rysnc commands. This value can be set higher via the -n command but if the number of DBRoots present in the system is large enough there may be a performance hit on system processing or network bandwidth limitations.
columnstoreRestore
The tool is designed to be run on the system storing the backups. This will automate restoring from backups created by the columnstoreBackup tool.
Restore Setup
To run columnstoreRestore you'll need to setup a backup server with passwordless ssh login available for the user account that installed MariaDB ColumnStore. (Default: root)
columnstoreRestore must be run as root or with sudo.
columnstoreRestore expects MariaDB Columnstore to be shutdown in a fresh install state.
Take the following steps to prepare system for columnstoreRestore:
On the active parent OAM module execute the command
Run on all PM modules:
Run on all UM or combo PM front-end nodes
On the active parent OAM module execute the command
On the backup system run columnstoreRestore script
Running columnstoreRestore
columnstoreRestore must be run as root user either logging in as root or via the sudo command.
EXAMPLE: Running from the directory /home/user/ with the columnstoreBackupData directory created in the columnstoreBackup example above:
This will execute a restore for the MariaDB ColumnStore system with a parent OAM module located at 192.168.1.100 from the directory located at home/user/columnstoreBackupData. Option v will print out a more verbose logging of commands executed and option z will let rsync utilize the compression option for file transfers.
Restore Logging
Logging is output to the console as well as to a columnstoreRestore.log that is located in the directory columnstoreRestore is executed. This will contain some extra details on some issues. Log rotation is left to the user for handling.
Restore Return Codes
Restore Operation Notes
columnstoreRestore will create a restoreConfig directory inside the backupServerLocation defined at command line. This is just meant to store a copy of the restored systems version and configuration file for verification the restore is possible.
The columnstoreRestore option -n [value] limits the number parallel rsync commands executed at a given time. The default 5 means up to 5 DBRoots will kick off rysnc commands to various PMs and the backup system will wait until all are complete and verified successful. At this time it will kick off another 5 DBRoots. The progress indicator should reflect the percentage of total completion and not individual rysnc commands. This value can be set higher via the -n command but if the number of DBRoots present in the system is large enough there may be a performance hit on system processing or network bandwidth limitations.
This page is licensed: CC BY-SA / Gnu FDL
Last updated
Was this helpful?