Dump all MySQL with shell and cron- upload to S3
A script is used for this - used on passwordless local root logins.
0 0 * * * /home/backup/mysql/dumpmysql.sh
0 1 * * * s3cmd sync /home/backup/mysql/ --multipart-chunk-size-mb=500 s3://bucketname/folder/mysql/
It should be noted that the shell script will dump all existing mysql databases to the /home/backup/mysql folder, archive then to a tgz named with todays date, then remove the .sql files.
The s3 cron syncs the files (sync does not upload existing files with matching checksums) - so you should set a lifecycle on the bucket folder to keep it from filling up.
Attached files: dumpmysql.sh