aboutsummaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-02-22 19:03:01 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-02-22 19:03:01 -0300
commit3dddc69e55e7e614f5298067cf7d5f09a7343a59 (patch)
treefc55e190781c773be7fb48440bb30ef8bcb6f902 /files
parent742efcf6642962f6a76a667f563a4bb6a55db7a2 (diff)
downloadpuppet-backup-3dddc69e55e7e614f5298067cf7d5f09a7343a59.tar.gz
puppet-backup-3dddc69e55e7e614f5298067cf7d5f09a7343a59.tar.bz2
Using rsync for non-git-annex repos at sync-media
Diffstat (limited to 'files')
-rw-r--r--files/sync-media6
1 files changed, 6 insertions, 0 deletions
diff --git a/files/sync-media b/files/sync-media
index dc93bd9..bcd4848 100644
--- a/files/sync-media
+++ b/files/sync-media
@@ -111,6 +111,9 @@ if [ -d "$CACHE" ]; then
cd $CACHE/$folder && git remote add $DRIVE $VOLUME/$MEDIA/$folder
)
fi
+ elif [ ! -d "$VOLUME/$MEDIA/$folder" ]; then
+ echo "Syncing $VOLUME/$MEDIA/$folder..."
+ rsync -av --delete $CACHE/$folder/ $VOLUME/$MEDIA/$folder/
fi
done
fi
@@ -140,6 +143,9 @@ if [ ! -z "$DRIVE" ] && [ -d "$VOLUME/$MEDIA" ]; then
#git annex drop --auto --numcopies=2
)
+ elif [ -d "$CACHE/$folder" ]; then
+ echo "Syncing $VOLUME/$MEDIA/$folder..."
+ rsync -av --delete $CACHE/$folder/ $VOLUME/$MEDIA/$folder/
fi
done
fi