Simple MySQL backup script that dumps it into file and uploads to Google Drive

29 Oct 2019

DATE=`date +%Y%m%d%H%M%S`
mysqldump DATABASE_NAME > backup-$DATE.txt
./gdrive-linux-x64 upload --parent 1Tf_oq5_lAAI2m2-QinjvtEq1YtCk4gqU backup-$DATE.txt
rm backup-$DATE.txt

Requirements: gdrive

Replace parent argument in second command with your own catalog on Drive.