diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-04-18 10:49:58 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-04-18 10:49:58 -0300 |
commit | 0618f455869e7ceb9ea2892dfe3dd7ab44593fcf (patch) | |
tree | 0a437b6b35b278d04780818e538507071219daf0 | |
parent | f77abee5d3586991eb39f57258c147d608994a3d (diff) | |
download | puppet-backup-0618f455869e7ceb9ea2892dfe3dd7ab44593fcf.tar.gz puppet-backup-0618f455869e7ceb9ea2892dfe3dd7ab44593fcf.tar.bz2 |
Sync-backups: be verbose
-rw-r--r-- | files/sync-backups | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/files/sync-backups b/files/sync-backups index 72fcdec..5787c40 100644 --- a/files/sync-backups +++ b/files/sync-backups @@ -22,21 +22,25 @@ function sync_backups_node { fi # Sync local encrypted backup. + echo "Syncing /var/vservers/$NODE/var/backups/duplicity/..." mkdir -p /$MEDIA/$NODE_HOSTNAME/duplicity $RSYNC /var/vservers/$NODE/var/backups/duplicity/ /$MEDIA/$NODE_HOSTNAME/duplicity/ # Sync remote backups. for node in `ls /var/vservers/$NODE/var/backups/remote/`; do + echo "Syncing /var/vservers/$NODE/var/backups/remote/$node/..." mkdir -p /$MEDIA/$NODE_HOSTNAME/remote/$node $RSYNC /var/vservers/$NODE/var/backups/remote/$node/ /$MEDIA/$NODE_HOSTNAME/remote/$node/ done else # Sync local encrypted backup. + echo "Syncing /var/backups/duplicity/..." mkdir -p /$MEDIA/$HOSTNAME/duplicity $RSYNC /var/backups/duplicity/ /$MEDIA/$HOSTNAME/duplicity/ # Sync remote backups. for node in `ls /var/backups/remote/`; do + echo "Syncing /var/backups/remote/$node/..." mkdir -p /$MEDIA/$HOSTNAME/remote/$node/ $RSYNC /var/backups/remote/$node/ /$MEDIA/$HOSTNAME/remote/$node/ done @@ -44,8 +48,8 @@ function sync_backups_node { # Copy encrypted images. if [ -d "$IMAGES" ]; then for image in `find $IMAGES -name '*.img' -type f`; do - mkdir -p /$MEDIA/$HOSTNAME/images/`dirname $image` echo "Copying image to /$MEDIA/$HOSTNAME/images/`dirname $image`" + mkdir -p /$MEDIA/$HOSTNAME/images/`dirname $image` $CP $image /$MEDIA/$HOSTNAME/images/`dirname $image` done fi |