summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/hydra/backup11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/hydra/backup b/lib/hydra/backup
index 9c35ff9..e3edf50 100644
--- a/lib/hydra/backup
+++ b/lib/hydra/backup
@@ -2,10 +2,11 @@
# Setup environment for the backups website
function hydra_backup_environment_local_website {
- SITE="$1"
- BACKUPDIR="/var/sites/backups/site/$SITE"
+ NODE="$1"
+ SITE="$2"
+ BACKUPDIR="/var/sites/backups/site/$SITE/$NODE"
- if [ -z "$SITE" ]; then
+ if [ -z "$SITE" ] || [ -z "$NODE" ]; then
hydra_action_usage
exit 1
fi
@@ -61,10 +62,10 @@ function hydra_backup_environment_remote {
if [ -z "$METHOD" ]; then
if [ -d "$BACKUPDIR/rsync" ]; then
echo "Assuming rsync backup method"
- BACKUPDIR="$BACKUPDIR/rsync"
+ BACKUPDIR="$BACKUPDIR/rsync/var/backups/duplicity/daily.1"
elif [ -d "$BACKUPDIR/rdiff" ]; then
echo "Assuming rdiff backup method"
- BACKUPDIR="$BACKUPDIR/rdiff"
+ BACKUPDIR="$BACKUPDIR/rdiff/var/backups/duplicity"
else
echo "Missing backup action"
exit 1