Nikerabbit has uploaded a new change for review.
https://gerrit.wikimedia.org/r/317833
Change subject: Puppet: use pbzip2 for db backups
......................................................................
Puppet: use pbzip2 for db backups
Cuts database backup creation time from 20 minutes to 5 minutes.
Add nice also for compression.
Change-Id: I79144eae61629d440812c31223b5e78e4307d57b
---
M puppet/modules/backup/manifests/init.pp
M puppet/modules/backup/templates/dump-databases.sh.erb
2 files changed, 6 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/translatewiki
refs/changes/33/317833/1
diff --git a/puppet/modules/backup/manifests/init.pp
b/puppet/modules/backup/manifests/init.pp
index ec7009a..3dca8c7 100644
--- a/puppet/modules/backup/manifests/init.pp
+++ b/puppet/modules/backup/manifests/init.pp
@@ -9,7 +9,11 @@
#
class backup ($databases) {
package { 'duplicity':
- ensure => present,
+ ensure => present,
+ }
+
+ package { 'pbzip2':
+ ensure => present,
}
file { '/etc/cron.d/backup':
diff --git a/puppet/modules/backup/templates/dump-databases.sh.erb
b/puppet/modules/backup/templates/dump-databases.sh.erb
index be2aa7a..bf5b5e0 100644
--- a/puppet/modules/backup/templates/dump-databases.sh.erb
+++ b/puppet/modules/backup/templates/dump-databases.sh.erb
@@ -3,5 +3,5 @@
<% @databases.each do |db| -%>
nice mysqldump --opt --single-transaction \
--user=root --password="" <%= db %> \
- | bzip2 > /root/db-backup-<%= db %>.sql.bz2
+ | nice pbzip2 > /root/db-backup-<%= db %>.sql.bz2
<% end -%>
--
To view, visit https://gerrit.wikimedia.org/r/317833
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I79144eae61629d440812c31223b5e78e4307d57b
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits