What is AutoMysqlBackup
AutoMySQLBackup with a basic configuration will create Daily, Weekly and Monthly backups of one or more of your MySQL databases from one or more of your MySQL servers.
How to install AutoMySQLBackup on Ubuntu
sudo apt-get install automysqlbackup
Tool backup file to Google Drive
We use gdrive tool by prasmussen on github.com
https://github.com/prasmussen/gdrive
How to push AutoMysqlBackup files to Google Drive with cronjob
0. Download gdrive tool for 64bit
wget https://drive.google.com/uc?id=0B3X9GlR6Embnb095MGxEYmJhY2c -O /usr/local/bin/gdrive chmod 755 /usr/local/bin/gdrive
1. Get access-key from Google Drive
run gdrive command and open the url to get verification code
gdrive Go to the following link in your browser: https://accounts.google.com/o/oauth2/auth?client_id=367116221053-7n0vf5akeru7on6o2fjinrecpdoe99eg.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&state=state Enter verification code: 4/IW2XFXswSDRSDFSDvSXesSeIjScmsoHVJecpMoqS2GY
2. Set backup file to Google Drive on cronjob
crontab -e 0 3 * * * /usr/local/bin/gdrive upload --file /var/lib/automysqlbackup >/dev/null 2>&1
Reff
+ Google
+ Timothy-quinn
Nice article! How would I set the folder name in drive? So it would upload to a custom folder name?
i think you could use `-p`, see on docs/help
-p, –parent Parent id, used to upload file to a specific directory, can be specified multiple times to give many parents
make sure you know the parent id of the folder.