How to install and configure AutoMySQLBackup

mysqlIn this blog article we will 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

As usual, log in to your server as user root

ssh root@IP

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

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

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.

Download the latest version of AutoMySQLBackup to your server


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.

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 do any of this 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 please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

Blocking abusive IP addresses using IPTABLES Firewall in Debian/Ubuntu
Install October CMS on an Ubuntu VPS with Nginx and MariaDB
How to install Elgg with Nginx on Ubuntu 14.04
  • 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.