Learn How To Install and Configure AutoMySQLBackup on Ubuntu 16.04

September 18, 2019

Table of Contents


AutoMySQLBackup is a free and open source tool that can be used to create backups of your MySQL databases at varying intervals, such as daily, weekly, and monthly. It uses mysqldump to create backups of one or more MySQL databases from one of more MySQL servers. It provides lots of features such as email notification, incremental database backups, backup compression and encryption, and much more.

In this tutorial, we will explain how to install and use AutoMySQLBackup on Ubuntu 16.04 server.


  • An ITWeb.Services Ubuntu 16.04 server instance.
  • A working MySQL Server.
  • A sudo user.

Step 1: Install AutoMySQLBackup

Before installing AutoMySQLBackup, make sure your system is up-to-date.
You can do this by running the following command:

sudo apt-get update -y
sudo apt-get upgrade -y
sudo shutdown -r now

Next, install AutoMySQLBackup from the Ubuntu repository with the following command:

sudo apt-get install automysqlbackup

Once the installation is complete, you can proceed to configure AutoMySQLBackup.

Step 2: Configure AutoMySQLBackup

In order to configure AutoMySQLBackup, you will need to edit its configuration file located in /etc/automysqlbackup/ directory:

sudo nano /etc/automysqlbackup/automysqlbackup.conf

Change the file as per your requirements:


Save and close the file when you are finished.

All the above settings are optional. So it is a good idea to check the configuration file for more information about the settings of AutoMySQLBackup.

Next, create a directory for storing MySQL backup.

sudo mkdir /var/backup

Finally, run the following command to create a backup of your MySQL databases:

sudo automysqlbackup

You don’t want to run automysqlbackup manually all the time. You can create a daily cron job for it as below:

sudo ln -s /usr/local/bin/automysqlbackup /etc/cron.daily/

This concludes our tutorial. Thank you for reading.

Need help?

Do you need help setting up this on your own service?
Please contact us and we’ll provide you the best possible quote!