aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-12-16 21:36:49 -0200
committerSilvio Rhatto <rhatto@riseup.net>2010-12-16 21:36:49 -0200
commitb2ae814bee99f7877b9179e0f9bf248b270625f2 (patch)
tree2a0891e7f036e97e778d9c29ac156d770677ce83
parentafd07e064cb18684ca402d79a8d41990488f25a8 (diff)
downloadpuppet-backup-b2ae814bee99f7877b9179e0f9bf248b270625f2.tar.gz
puppet-backup-b2ae814bee99f7877b9179e0f9bf248b270625f2.tar.bz2
Putting remote backups in a subfolder at sync-backups
-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.