AutoMySQLBackup is a free opensource tool that automatically backs-up all the databases hosted on a MySQL server at varying intervals. It’s a great tool that may come in handy in a time of trouble. Not only can it backup MySQL databases automatically, it also comes with many features like email notifications, incremental backups, back up compression and encryption.
If you’re looking for a simple yet powerful tool to automatically backup MySQL databases, you may want to try this. You probably won’t regret it.
This brief tutorial is going to show you how to install and configure in on Ubuntu servers.
To get it installed and configured, follow the steps below
Step 1: Install AutoMySQLBackup
This post assumes you already have MySQL server installed and have few databases to backup. If you haven’t done that, please search on this blog to find easy tutorials on installing MySQL or MariaDB servers.
When you have MySQL server installed and few databases created, continue below to install AutoMySQLBackup.
Run the commands below to install the tool.
sudo apt-get update
sudo apt-get install automysqlbackup
During the installation, you’ll be prompted to choose a mail configuration as shown below.. Select Internet Site if you’re going to be setting up email notification. If not, then just select No configuration.
Please select the mail server configuration type that best meets your needs.
Should be chosen to leave the current configuration unchanged.
Mail is sent and received directly using SMTP.
Internet with smarthost:
Mail is received directly using SMTP or by running a utility such
as fetchmail. Outgoing mail is sent using a smarthost.
All mail is sent to another machine, called a 'smarthost', for delivery.
The only delivered mail is the mail for local users. There is no network.
General type of mail configuration:
Internet with smarthost
After selecting your options, select Ok to continue with the installation.
Step 2: Configure AutoMySQLBackup
Now that the tool is installed, go and configure it. I couldn’t find any configuration file crated, so I had to create one myself. The default configuration directory for AutoMySQLBack is at:
Create a new configuration file with the parameters as shown below. Run the commands below to create a new configuration file.
sudo nano /etc/automysqlbackup/automysqlbackup.conf
Then add the content below into the file and save.
Save the file
Now to run the backup manually, just type the commands below.
To automatically run the backup daily, run the commands below.
sudo ln -s /usr/sbin/automysqlbackup /etc/cron.daily/
Also look in the folder below for back up jobs that were run manually.
This post shows students and new users an easy want to automatic MySQL backup on Ubuntu. With AuthMySQLBackup tool, one can set a backup job to run daily, weekly or monthly.
The job will then backup all MySQL databases and store them in the location specify.
You may also like the post below
Installing LAMP on Ubuntu 17.04 / 17.10