How to install and configure AutoMySQLBackup

How to install and configure AutoMySQLBackup

we’ll show you, how to install AutoMySQLBackup on a Linux VPS. AutoMySQLBackup is very useful utility for creating daily, weekly or monthly backups of one or more MySQL databases from one of more MySQL servers. It dumps the databases and compress them in to comes with many features such as:

  •   Email notification of backups
  •   Backup Compression and Encryption
  •   Configurable backup rotation
  •   Incremental database backups

1. Login via SSH

As usual, log in to your server as user root

ssh [email protected]

2. Update the System

and execute the following command to make sure that all services ar up to date

For Debian based systems execute

apt-get update && apt-get upgrade

For RPM based systems execute

yum -y update

3. On Debian based distributions AutoMySQLBackup is available in the repositories

If you are running Debian based distro AutoMySQLBackup is available in the repositories and you can easily install it by executing the following

apt-get install automysqlbackup

4. On RPM based distributions you will have to download AutoMySQLBackup

If you have a RPM based distro you will have to download AutoMySQLBackup’s installation scripts, run and configure them on your server. In this tutorial we will install Automysqlbackup on a CentOS 7 VPS.

5. Download AutoMySQLBackup

Download the latest version of AutoMySQLBackup to your server


6. Install AutoMySQLBackup

Create a directory for Automysqlbackup’s scripts and unpack the downloaded tar archive

mkdir /opt/automysqlbackup
tar zxvf automysqlbackup-v3.0_rc6.tar.gz -C /opt/automysqlbackup

Once the archive is unpacked run the Automysqlbackup installation script

cd /opt/automysqlbackup

### Checking archive files for existence, readability and integrity.

automysqlbackup ... exists and is readable ... md5sum okay :)
automysqlbackup.conf ... exists and is readable ... md5sum okay :)
README ... exists and is readable ... md5sum okay :)
LICENSE ... exists and is readable ... md5sum okay :)

Select the global configuration directory [/etc/automysqlbackup]:
Select directory for the executable [/usr/local/bin]:
### Creating global configuration directory /etc/automysqlbackup:


You can use the default paths for the global configuration directory and the directory for the executable. You just have to press Enter when the paths are required.

7. Configure AutoMySQLBackup

Next, we have to configure AutoMySQLBackup. Open its configuration file located in the directory we set when we ran the installation script.

vim /etc/automysqlbackup/automysqlbackup.conf

And uncommend and set the following confituration directives


Once you are done with editing, save the configuration file. All settings are optional and there is description for all of them, so it is best to check the configuration file for more information about the settings of AutoMySQLBackup.

Create a directory for the MySQL backups. This is the directory we set as ‘backup_dir’ in the configuration file.

mkdir /var/backup

If you want to create a backup of your MySQL databases, run AutoMySQLBackup by executing the following


You can also create a crontab entry to run AutoMySQLBackup at a specific time.

That’s all. You can check the README file for more information on how to use AutoMySQLBackup.

Of course you don’t have to install and configure AutoMySQLBackup, if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install AutoMySQLBackup for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post, on how to install and configure AutoMySQLBackup, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

Install Chevereto on a CentOS 7 Linux VPS
How to migrate from ownCloud to Nextcloud
Install HumHub on an Ubuntu VPS with Nginx and MariaDB
  • Toki Burke

    Toki BurkeToki Burke

    Author Reply

    When would it run?
    I tried it but nothing happend. when i run `automysqlbackup`. I want it do it job everyday at 05:00 AM without using global crontab (crontab -e) .

    • admin


      Author Reply

      To schedule your database backups you need to create a cron job.

  • Geeks


    Author Reply

    Thanks for the guide.

  • Patrice


    Author Reply

    This was missing:
    CONFIG_db_exclude=( ‘performance_schema’ ‘information_schema’ )