This has to have a --user=root in order to be able to access the dbs

It runs as mysql user, but root when connecting to the db.
This commit is contained in:
Kevin Fenzi 2015-06-04 18:37:12 +00:00
parent ef817b7d0c
commit 140af2c7ac

View file

@ -4,7 +4,7 @@
DB=$1
# Make our latest backup
/bin/mysqldump --add-drop-database $DB | /usr/bin/xz > /backups/$DB-$(date +%F).dump.xz
/bin/mysqldump --user=root --add-drop-database $DB | /usr/bin/xz > /backups/$DB-$(date +%F).dump.xz
# Also, delete the backup from a few days ago.
rm -f /backups/$DB-$(date --date="3 days ago" +%F).dump.xz