How to push AutoMysqlBackup files to Google Drive

44 sec read

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

How to install NextCloud in Ubuntu 22.04

What’s NextCloud Nextcloud is an open-source software suite that offers a secure, self-hosted alternative to popular cloud storage and productivity platforms. With a focus...
sysadmin.id
8 min read

Reset root password on CentOS 7

Edit boot menu on-the-go 0. reboot the CentOS 7 and press ESC when GRUB menu show up on the screen and press “e” 1....
sysadmin.id
18 sec read

Free ext4 reserved blocks with tune2fs

Check disk usage df -h Filesystem Size Used Avail Use% Mounted on /dev/vda1 95G 82G 7.9G 92% / Check size of Reserved block count...
sysadmin.id
19 sec read