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:
parent
ef817b7d0c
commit
140af2c7ac
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue