aboutsummaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
Diffstat (limited to 'files')
-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