aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-04-18 10:49:58 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-04-18 10:49:58 -0300
commit0618f455869e7ceb9ea2892dfe3dd7ab44593fcf (patch)
tree0a437b6b35b278d04780818e538507071219daf0
parentf77abee5d3586991eb39f57258c147d608994a3d (diff)
downloadpuppet-backup-0618f455869e7ceb9ea2892dfe3dd7ab44593fcf.tar.gz
puppet-backup-0618f455869e7ceb9ea2892dfe3dd7ab44593fcf.tar.bz2
Sync-backups: be verbose
-rw-r--r--files/sync-backups6
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