Configure automatic backup of mysql databases and configure to sync with cloud storage

Tested on Ubuntu 16.04 – configured via terminal

install automysqlbackup

‘sudo apt install automysqlbackup’

run once with ‘sudo automysqlbackup’ to generate backup file structure

default backup location is /var/lib/automysqlbackup (configurable via /etc/default/automysqlbackup)

‘sudo chmod -R 744 /var/lib/automysqlbackup’ to change that folder and all subfolders to be readable by root.

Edit /usr/sbin/automyqlbackup so the chmod value is not 600, but instead 744

For example:

sudo vim /usr/sbin/automysqlbackup

?chmod, press enter

i for insert mode, edit chmod to be 744 instead of 600.

:wq! To write changes

Now all folders and files are readable and future backups will be readable by your linux user account. Any cloud storage you install on this computer/server such as pcloud or google drive or whatever will now be able to read those files and will automatically sync upon those updates being run by automysqlbackup. When automysqlbackup runs, the cloud program you are using will see the changes and upload the files to cloud storage.