diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2010-12-16 21:36:49 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2010-12-16 21:36:49 -0200 |
commit | b2ae814bee99f7877b9179e0f9bf248b270625f2 (patch) | |
tree | 2a0891e7f036e97e778d9c29ac156d770677ce83 | |
parent | afd07e064cb18684ca402d79a8d41990488f25a8 (diff) | |
download | puppet-backup-b2ae814bee99f7877b9179e0f9bf248b270625f2.tar.gz puppet-backup-b2ae814bee99f7877b9179e0f9bf248b270625f2.tar.bz2 |
Putting remote backups in a subfolder at sync-backups
-rw-r--r-- | files/sync-backups | 5 |
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. |