aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2010-12-16 22:02:05 -0200
committerSilvio Rhatto <rhatto@riseup.net>2010-12-16 22:02:05 -0200
commit8c87ef80954658d5224e33c5fc24481f22222640 (patch)
tree1e51ea56803bf4cfe22dfb3b8388d88264cc85f8
parentb2ae814bee99f7877b9179e0f9bf248b270625f2 (diff)
downloadpuppet-backup-8c87ef80954658d5224e33c5fc24481f22222640.tar.gz
puppet-backup-8c87ef80954658d5224e33c5fc24481f22222640.tar.bz2
Sync local encrypted backup also inside vservers
-rw-r--r--files/sync-backups5
1 files changed, 5 insertions, 0 deletions
diff --git a/files/sync-backups b/files/sync-backups
index c23e05d..490e4c9 100644
--- a/files/sync-backups
+++ b/files/sync-backups
@@ -10,6 +10,11 @@ IMAGES="/var/data/crypt/"
RSYNC="nice -n 19 rsync -avH --delete --bwlimit=$BWLIMIT"
if [ ! -z "$NODE" ]; then
+ # Sync local encrypted backup.
+ mkdir -p /$MEDIA/$NODE/duplicity
+ $RSYNC /var/vservers/$NODE/var/backups/duplicity/ /$MEDIA/$NODE/duplicity/
+
+ # Sync remote backups.
for node in `ls /var/vservers/$NODE/var/backups/remote/`; do
mkdir -p /$MEDIA/$NODE/remote/$node
$RSYNC /var/vservers/$NODE/var/backups/remote/$node/ /$MEDIA/$NODE/remote/$node/