From 140af2c7ac099a5f97371acf7c5cf489fc11c9ab Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 4 Jun 2015 18:37:12 +0000 Subject: [PATCH] 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. --- roles/mariadb_server/files/backup-database | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mariadb_server/files/backup-database b/roles/mariadb_server/files/backup-database index ee72e30eeb..31673af41d 100644 --- a/roles/mariadb_server/files/backup-database +++ b/roles/mariadb_server/files/backup-database @@ -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