1. Home
  2. Docs
  3. Backup Ninja
  4. User Guide
  5. Schedules
  6. Backup Methods

Backup Methods

Backup Ninja supports database backup and file backup. For the database backup methods, here is the list below:

Database Server Backup Methods
MySQL mysqldump, Percona Xtrabackup (xtrabackup)
MariaDB mysqldump, MariaDB Backup (mariabackup)
PostgreSQL/TimeScaleDB pg_dumpall, pg_basebackup
MongoDB mongodump

For file backup, the only method you can choose is file (beta). Otherwise, if the server was set up as Database & Files Backups, then you can also see both backup methods for database backup and file backup methods.

Note that Backup Ninja will list out all the available backup methods on the selected server. If the supported backup method that you would like to use is not listed under the Backup Method dropdown, you may need to install it first. Refer to the next section for instructions.

Installing the Backup Tool

This section provides instructions on how to install the supported backup tool on your database server. The installation steps shown here should be performed on the database server where the Backup Ninja agent is running.

mysqldump

mysqldump can be used to dump a database or a collection of databases for backup or transfer to another database server (not necessarily MariaDB or MySQL). The dump typically contains SQL statements to create the table, populate it, or both.

This tool is available by default if you installed the database by following the vendor’s instructions. If you don’t see it listed, you probably missed out on the MySQL/MariaDB client package. To install it, simply run the following command on your respective OS distribution:

RedHat/CentOSDebian/Ubuntu
$ yum install mysql # For mysql in the standard repo
$ yum install mariadb # For MariaDB
$ yum install Percona-Server-client # For Percona Server
$ apt-get install mysql-client # For mysql in the standard repo
$ apt-get install MariaDB-client # For MariaDB
$ apt-get install Percona-Server-client # For Percona Server

Percona XtraBackup

Backup Ninja addresses Percona Xtrabackup as xtrabackup. Percona Xtrabackup is available in the Percona repository. To install xtrabackup, follow instructions provided in the following pages:

MariaDB Backup

MariaDB Backup is a fork of Percona XtraBackup with added support for compression and data-at-rest encryption available in MariaDB, included in MariaDB 10.1.23 and later. Backup Ninja addresses MariaDB Backup as mariabackup.

For MariaDB Server 10.1.23 and later, it’s recommended to use MariaDB Backup (as opposed to Percona Xtrabackup) to take a physical backup. To install the package, the MariaDB repository must be configured and enabled:

$ curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash

Then, install the MariaDB Backup package as follows:

RedHat/CentOSDebian/Ubuntu

$ yum install MariaDB-backup

$ apt-get install mariadb-backup

pg_dumpall

PostgreSQL’s pg_dumpall is available in the PostgreSQL client group package namely, postgresql{version} for RHEL/CentOS and postgresql-client-{version} for Debian/Ubuntu distribution.

Installing the following package will install pg_dumpall altogether:

RedHat/CentOSDebian/Ubuntu

For PostgreSQL 11:

$ yum install postgresql11
$ apt-get install postgresql-client-common

pg_basebackup

PostgreSQL’s pg_basebackup is available in the PostgreSQL client group package namely, postgresql{version} for RHEL/CentOS and postgresql-client-{version} for Debian/Ubuntu distribution. pg_basebackup is used to take base backups of a running PostgreSQL database cluster (PostgreSQL 9.4 and later). These are taken without affecting other clients to the database and can be used both for point-in-time recovery.

Installing the following package will install pg_basebackup altogether:

RedHat/CentOSDebian/Ubuntu

For PostgreSQL 11:

$ yum install postgresql11
$ apt-get install postgresql-client-common

mongodump

This tool is installed by default if you installed MongoDB server following the vendor’s instructions. However, if mongodump does not exist on the server, install it by using the following command:

RedHat/CentOSDebian/Ubuntu
$ yum install mongodb-org-tools
$ apt-get install mongodb-org-tools
Was this article helpful to you? Yes No