aboutsummaryrefslogtreecommitdiff
path: root/manifests/subsystems
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-09-05 13:22:48 -0300
committerSilvio Rhatto <rhatto@riseup.net>2012-09-05 13:22:48 -0300
commit35613fe0e9de8e8229862c939d3c9fb8890a1db2 (patch)
tree36dd3b9fdf6e92bfe8fb40d45e73448702cbefbf /manifests/subsystems
parent126e34605a20b8134719e036bef68568bbc102cb (diff)
downloadpuppet-nodo-35613fe0e9de8e8229862c939d3c9fb8890a1db2.tar.gz
puppet-nodo-35613fe0e9de8e8229862c939d3c9fb8890a1db2.tar.bz2
Including mysql backup at database class; adding --single-transaction sql dump option to avoid 'out of resources' error
Diffstat (limited to 'manifests/subsystems')
-rw-r--r--manifests/subsystems/database.pp7
1 files changed, 7 insertions, 0 deletions
diff --git a/manifests/subsystems/database.pp b/manifests/subsystems/database.pp
index d205ad6..17500ff 100644
--- a/manifests/subsystems/database.pp
+++ b/manifests/subsystems/database.pp
@@ -20,6 +20,13 @@ class database {
notify => Service['mysql'],
}
+ backupninja::mysql { "all_databases":
+ backupdir => '/var/backups/mysql',
+ compress => true,
+ sqldump => true,
+ sqldumpoptions => '--lock-tables --complete-insert --add-drop-table --quick --quote-names --single-transaction',
+ }
+
# Database definitions
define instance($password, $ensure = 'present', $privileges = 'all') {
mysql_database { "$name":