How to Backup Your Amazon RDS for MariaDB Data and Restore on Your Own Server

How to Backup Your Amazon RDS for MariaDB Data and Restore on Your Own Server

Profile picture for user sarojini
Sarojini Devi Nagappan
12 November 2020

MariaDB is an open-source database created by the developers of MySQL to support workloads which previously required specialized databases. Amazon RDS gives you the flexibility to create MariaDB databases on the cloud in minutes. MariaDB on Amazon RDS is configured with easily resizable hardware capacity and integrated with administrative features for backup management, software upgrades, scaling, and replication. This blog gives an insight into Amazon RDS for MariaDB features and moves on to show you how to use Backup Ninja as a backup service to backup MariaDB from Amazon RDS to your own server.

Key Features of Amazon RDS for MariaDB features

Amazon RDS gives you full access to the MariaDB database engine, and this allows you to migrate existing MariaDB databases to the Amazon RDS for MariaDB at any point of time without any customization and development adjustments. Amazon RDS takes care of database software upgrades, backups, and enables point in time recovery. General Purpose (SSD) storage, Provisioned IOPS (SSD), or Magnetic are the storage options for the Amazon RDS for MariaDB, and this can be resized at any time. Suppose you need consistent performance and the database handles transaction-intensive workloads, then Provisioned IOPS (SSD) is the best option. Provisioned IOPS (SSD) is a high performance storage which gives you consistent performance required for transaction intensive workloads. Following are some of the key features of Amazon RDS for MariaDB:

  • Preconfigured parameters allow you to create a MariaDB instance and connect to your application faster without any configuration. If required, the configurations can be changed using the DB Parameter Groups.
  • Includes centralised monitoring to monitor CPU performance, memory, and database using AWS Management Console.
  • Inbuilt with an alert system to notify you on database events.
  • Automatic database software updates.
  • Includes automated backup feature which enables point in time recovery.
  •  Scale the compute and memory resources for better deployment performance.
  • Support for high availability with automatic failover to the standby database.
  • Encryption for in-transit and at-rest data and allows you to encrypt the database and manage the security keys using the AWS management console. 

Amazon RDS MariaDB Backups Using Backup Ninja

Amazon RDS for MariaDB by default turns on the automated backup which can be used for a point in time recovery. Also, there is the DB snapshot feature which allows you to take a full backup and is stored on the server till you delete them. Alternatively, you can use backup services like Backup Ninja, Solarwind, Veeam to create and manage backups efficiently in your preferred location.

Backup Ninja is a simple to use automated backup service for you to take backups for open source databases, files, and directories and store them locally or in the cloud without using scripts. With Backup Ninja, you won’t need an experienced technical person to manage and create backups. Instead, just install the Back Ninja agent on the server which connects to your storage and manages the storage of fully-encrypted backups on the cloud storage provider of your choosing. The interactive dashboard gives you key performance indicators to monitor all your backups and backups events centrally.

Installing the Backup Ninja Agent on Your Server

To schedule backups on Backup Ninja, you will need to install the agent on your backup server. This agent will then communicate with your database and take backups according to the backup schedule you have created. For security purposes, Backup Ninja does not store any security keys and uses advanced encryption algorithms to protect your backup. Following are the simple steps to install the Backup Ninja agent on your server.

Step 1: Set your backup target

In the first step, you need to decide the type of backup you would like to have. You can either choose to backup and restore or only the backup option where you can always edit and add in the restore option. Next, select the database technology and the version. The version selection is enabled when you choose the database server type here.

Installing the Backup Ninja Agent on Your Server

Step 2: Creating a Database User

Backup Ninja requires a database user with the privilege to backup and restore the database. For a managed database, click on the checkbox below to use the existing user to manage the database backups. Fill in the hostname, which could be the endpoint or an IP address, and the password, and proceed to the next step.

Installing the Backup Ninja Agent on Your Server

Step 3: Install the Backup Ninja Agent

To install the agent, you will need to copy and execute the installation script on the backup server.

Installing the Backup Ninja Agent on Your Server

Step 4: Server Discovery

Once the installation is complete, the server will be discovered automatically and displayed on the screen.

Installing the Backup Ninja Agent on Your Server

You will see the discovered server added to the list of servers on the Servers listing page.

Installing the Backup Ninja Agent on Your Server

The next sections show you how to schedule backups for an Amazon RDS MariaDB database instance.

Scheduling Amazon RDS MariaDB Database Backup Using Backup Ninja

Step 1: Complete the schedule details.

Give a name for the backup schedule and select the server you want to backup. The backup method will list the backup tools installed in the server automatically. Backup type allows you to choose either a full or partial backup type. Select the mysqldump and partial backup type to backup the selected MariaDB database from Amazon RDS.

Scheduling Amazon RDS MariaDB Database Backup Using Backup Ninja

Step 2: Configure the backup storage.

Next select where you would like to store the backup. You can have a combination of local and cloud storage configured on the same screen. If you would like to add more storage locations, simply click on the Add New Storage button and fill in the next storage location. Retention here is the duration of how long you would want to keep the backup.

Scheduling Amazon RDS MariaDB Database Backup Using Backup Ninja

Step 3: Backup name, compression, and encryption setting

Give a name to your backup, or you can choose to leave it at the default setting. If you are concerned about the backup size, enable the compression toggle and the backup will be compressed using the gzip compression. You can also enable the encryption to have encrypted backups.

Scheduling Amazon RDS MariaDB Database Backup Using Backup Ninja

Step 4: Set the backup frequency.

The last step is to set the frequency of the backup task, and the backups will be scheduled to run according to the database server settings.

Scheduling Amazon RDS MariaDB Database Backup Using Backup Ninja

View the created schedule on the scheduled listing. Click on the play button to start or pause the schedule. 

Scheduling Amazon RDS MariaDB Database Backup Using Backup Ninja

You can view the details of the schedule, including the backup information when you click on the View link.

Scheduling Amazon RDS MariaDB Database Backup Using Backup Ninja

You can view the status of the backups completed for this schedule at the bottom of the page. Here, the backup listing will show you the status of the backup, the storage location path, and you can restore the selected backup at any point in time.

Conclusion

Amazon RDS for MariaDB offers you a full set of features to deploy scalable MariaDB instances quickly in a cost effective way. While Amazon RDS turns on backups by default and also allows you to take backup snapshots of your own, it is good to have a copy of backups stored at a different platform to avoid complete dependency on a service. Having a backup service like Backup Ninja would isolate the backup management of not only your database but important files and directories safely locally in the cloud in an automated way. Having backups stored and managed on different data centers accelerates the recovery process in case of any disasters.

Tags