mirror of
https://github.com/ChrisSewell/MySQL-backup-to-Amazon-S3.git
synced 2025-07-01 18:47:26 -04:00
Added path for mysqldump so cron actually works
This commit is contained in:
@ -6,10 +6,12 @@
|
|||||||
# change these variables to what you need
|
# change these variables to what you need
|
||||||
MYSQLROOT=root
|
MYSQLROOT=root
|
||||||
MYSQLPASS=password
|
MYSQLPASS=password
|
||||||
S3BUCKET=mybucket
|
S3BUCKET=my-db-backup-bucket
|
||||||
|
# when running via cron, the PATHs MIGHT be different. If you have a custom/manual MYSQL install, you should set this manually like MYSQLDUMPPATH=/usr/local/mysql/bin/
|
||||||
|
MYSQLDUMPPATH=
|
||||||
|
|
||||||
# dump all databases
|
# dump all databases
|
||||||
mysqldump --quick --user=${MYSQLROOT} --password=${MYSQLPASS} --single-transaction --all-databases > ~/all-databases.sql
|
${MYSQLDUMPPATH}mysqldump --quick --user=${MYSQLROOT} --password=${MYSQLPASS} --single-transaction --all-databases > ~/all-databases.sql
|
||||||
|
|
||||||
if [ $1 != month ]
|
if [ $1 != month ]
|
||||||
then
|
then
|
||||||
|
Reference in New Issue
Block a user