aboutsummaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
Diffstat (limited to 'files')
-rw-r--r--files/sync-backups5
1 files changed, 3 insertions, 2 deletions
diff --git a/files/sync-backups b/files/sync-backups
index ecf4be7..c23e05d 100644
--- a/files/sync-backups
+++ b/files/sync-backups
@@ -11,7 +11,8 @@ RSYNC="nice -n 19 rsync -avH --delete --bwlimit=$BWLIMIT"
if [ ! -z "$NODE" ]; then
for node in `ls /var/vservers/$NODE/var/backups/remote/`; do
- $RSYNC /var/vservers/$NODE/var/backups/remote/$node/ /$MEDIA/$node/
+ mkdir -p /$MEDIA/$NODE/remote/$node
+ $RSYNC /var/vservers/$NODE/var/backups/remote/$node/ /$MEDIA/$NODE/remote/$node/
done
else
# Sync local encrypted backup.
@@ -21,7 +22,7 @@ else
# Sync remote backups.
for node in `ls /var/backups/remote/`; do
mkdir -p /$MEDIA/$node/
- $RSYNC /var/backups/remote/$node/ /$MEDIA/$node/
+ $RSYNC /var/backups/remote/$node/ /$MEDIA/$HOSTNAME/remote/$node/
done
# Copy encrypted images.