summaryrefslogtreecommitdiffstats
path: root/provision_drupal.module
diff options
context:
space:
mode:
authorAdrian Rossouw2008-01-17 03:53:42 (GMT)
committeradrian2008-01-17 03:53:42 (GMT)
commitf77b1576b130af627c13d6d4b8fd62a20445ddf7 (patch)
tree06739421b29ecb804e6429af68a678d828046faf /provision_drupal.module
parent0e9cbce6a8b6674b1f4fb57c377296eb0743388b (diff)
fix #default_value in provision_drupal and add backup command
Diffstat (limited to 'provision_drupal.module')
-rw-r--r--provision_drupal.module15
1 files changed, 15 insertions, 0 deletions
diff --git a/provision_drupal.module b/provision_drupal.module
index d997bff..369cb5a 100644
--- a/provision_drupal.module
+++ b/provision_drupal.module
@@ -74,6 +74,21 @@ function _provision_drupal_site_exists($url) {
return file_exists("sites/$url/settings.php");
}
+
+/**
+ * Implentation of hook_provision_backup()
+ */
+function provision_drupal_provision_backup($url, $data) {
+ // Adds the site directory into the backup file
+ provision_log("backup", "Adding sites directory to $data[backup_file].gz");
+ $result = provision_shell_exec("cd %s; tar -rf %s * ", "sites/$url", $data['backup_file']);
+
+ if (!$result) {
+ provision_log("error", "Could not back up sites directory for drupal");
+ provision_set_error(PROVISION_FRAMEWORK_ERROR);
+ }
+}
+
/**
* The default template to use while generating config files.
*