aboutsummaryrefslogtreecommitdiff
path: root/manifests
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
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')
-rw-r--r--manifests/desktop.pp6
-rw-r--r--manifests/laptop.pp6
-rw-r--r--manifests/mail.pp7
-rw-r--r--manifests/master.pp6
-rw-r--r--manifests/subsystems/database.pp7
-rw-r--r--manifests/web.pp6
6 files changed, 11 insertions, 27 deletions
diff --git a/manifests/desktop.pp b/manifests/desktop.pp
index c87d454..e7496c2 100644
--- a/manifests/desktop.pp
+++ b/manifests/desktop.pp
@@ -43,12 +43,6 @@ class nodo::desktop::webdev inherits nodo::desktop {
include websites::dev
include database
include utils::web
-
- backupninja::mysql { "all_databases":
- backupdir => '/var/backups/mysql',
- compress => true,
- sqldump => true,
- }
}
class nodo::desktop::dev {
diff --git a/manifests/laptop.pp b/manifests/laptop.pp
index 34fde33..e088de1 100644
--- a/manifests/laptop.pp
+++ b/manifests/laptop.pp
@@ -58,12 +58,6 @@ class nodo::laptop::webdev inherits nodo::laptop {
include websites::dev
include database
include utils::web
-
- backupninja::mysql { "all_databases":
- backupdir => '/var/backups/mysql',
- compress => true,
- sqldump => true,
- }
}
class nodo::laptop::dev {
diff --git a/manifests/mail.pp b/manifests/mail.pp
index c82aac6..18a4a08 100644
--- a/manifests/mail.pp
+++ b/manifests/mail.pp
@@ -17,8 +17,9 @@ class nodo::mail {
include mail::system
backupninja::mysql { "all_databases":
- backupdir => '/var/backups/mysql',
- compress => true,
- sqldump => true,
+ backupdir => '/var/backups/mysql',
+ compress => true,
+ sqldump => true,
+ sqldumpoptions => '--lock-tables --complete-insert --add-drop-table --quick --quote-names --single-transaction',
}
}
diff --git a/manifests/master.pp b/manifests/master.pp
index 79cfb72..3bf276c 100644
--- a/manifests/master.pp
+++ b/manifests/master.pp
@@ -61,12 +61,6 @@ class nodo::master {
password => "$puppetmaster_db_password",
}
- backupninja::mysql { "all_databases":
- backupdir => '/var/backups/mysql',
- compress => true,
- sqldump => true,
- }
-
# Used for trac dependency graphs
package { "graphviz":
ensure => present,
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":
diff --git a/manifests/web.pp b/manifests/web.pp
index caf031a..ef05dbe 100644
--- a/manifests/web.pp
+++ b/manifests/web.pp
@@ -24,10 +24,4 @@ class nodo::web inherits nodo::vserver {
backupninja::svn { "svn":
src => "/var/svn",
}
-
- backupninja::mysql { "all_databases":
- backupdir => '/var/backups/mysql',
- compress => true,
- sqldump => true,
- }
}