summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/hydra/backup20
1 files changed, 17 insertions, 3 deletions
diff --git a/lib/hydra/backup b/lib/hydra/backup
index f98aa0f..9c35ff9 100644
--- a/lib/hydra/backup
+++ b/lib/hydra/backup
@@ -1,7 +1,7 @@
#!/bin/bash
-# Setup environment for backup restored from localhost
-function hydra_backup_environment_local {
+# Setup environment for the backups website
+function hydra_backup_environment_local_website {
SITE="$1"
BACKUPDIR="/var/sites/backups/site/$SITE"
@@ -14,12 +14,26 @@ function hydra_backup_environment_local {
RESTOREDIR="$BACKUPDIR/$DATE"
else
RESTOREDIR="$BACKUPDIR/`date +%Y%m%d`"
- fi
+ fi
DB_DUMP_BASE="$RESTOREDIR"
mkdir -p $RESTOREDIR
}
+# Setup environment for backup restored from localhost
+function hydra_backup_environment_local {
+ BACKUPDIR="/var/backups/duplicity"
+
+ if [ ! -z "$DATE" ]; then
+ RESTOREDIR="/var/backups/restore/$DATE"
+ else
+ RESTOREDIR="/var/backups/restore/`date +%Y%m%d`"
+ fi
+
+ DB_DUMP_BASE="$RESTOREDIR/var/backups/mysql/sqldump/"
+ mkdir -p $RESTOREDIR
+}
+
# Setup environment for backup restored from remote source
function hydra_backup_environment_remote {
NODE="$1"