Step One: Install AutoMySQLBackup
You can install AutoMySQLBackup from the Ubuntu repositories by running the following command as root:
sudo apt-get install automysqlbackup
Once installed, the script will automatically run once a day. Backups will be stored in the directory:
/var/lib/automysqlbackup
Step Two: Verify AutoMySQLBackup
To verify AutoMySQLBackup was configured properly, you can run it manually rather than waiting for it to be run the first time.
To run AutoMySQLBackup manually, execute the following command as root:
sudo automysqlbackup
Now list all of the files under /var/lib/automysqlbackup:
$ ls -R /var/lib/automysqlbackup/
automysqlbackup configuration file location:
/etc/default/automysqlbackup
[client]
host = localhost
user = root
password = "mysupersecretpass"
socket = /var/run/mysqld/mysqld.sock
optional
[mysql_upgrade]
host = localhost
user = root
password = mysupersecretpass
socket = /var/run/mysqld/mysqld.sock
basedir = /usr
root@murali:~# apt remove postfix
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
The following packages were automatically installed and are no longer required:
liblockfile-bin liblockfile1 libtokyocabinet9 mutt
Use ‘apt autoremove’ to remove them.
The following packages will be REMOVED:
automysqlbackup bsd-mailx postfix