summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-01-04 18:43:33 -0200
committerSilvio Rhatto <rhatto@riseup.net>2012-01-04 18:43:33 -0200
commit3f397ff1575b79f74184302f3c3b8e549895f571 (patch)
tree345e49f8b0e146e48b9a06db73258d8e88305822 /lib
parent26cbb26cebd495fd6260b6af65b37fe5c8a8c00b (diff)
downloadhydra-3f397ff1575b79f74184302f3c3b8e549895f571.tar.gz
hydra-3f397ff1575b79f74184302f3c3b8e549895f571.tar.bz2
Adding backup/copy sites; restoration fixes
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