Ryan Lane has submitted this change and it was merged.

Change subject: Use mysqldump --single-transaction where possible
......................................................................


Use mysqldump --single-transaction where possible

Change-Id: I14e6838a185ec8d84206bfa8f55583b6866823dd
---
M files/openstack/db-bak.sh
1 file changed, 9 insertions(+), 6 deletions(-)

Approvals:
  Ryan Lane: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/files/openstack/db-bak.sh b/files/openstack/db-bak.sh
index 8d56636..ac51c82 100644
--- a/files/openstack/db-bak.sh
+++ b/files/openstack/db-bak.sh
@@ -1,10 +1,13 @@
 #!/bin/bash
 
-for i in `mysql -BNe 'show databases'`
+DATE=$(date '+%Y%m%d')
+
+for i in labswiki keystone nova 
 do
-        if [ "${i}" == "information_schema" ]
-        then   
-                continue
-        fi
-        nice -n 19 mysqldump -u root ${i} -c | nice -n 19 gzip -9 > 
/a/backup/${i}-$(date '+%Y%m%d').sql.gz
+        nice -n 19 mysqldump --single-transaction -u root ${i} -c | nice -n 19 
gzip -9 > /a/backup/${i}-${DATE}.sql.gz
+done
+
+for i in glance mysql
+do
+        nice -n 19 mysqldump -u root ${i} -c | nice -n 19 gzip -9 > 
/a/backup/${i}-${DATE}.sql.gz
 done

-- 
To view, visit https://gerrit.wikimedia.org/r/55015
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I14e6838a185ec8d84206bfa8f55583b6866823dd
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ryan Lane <[email protected]>
Gerrit-Reviewer: Ryan Lane <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to