diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-02-22 19:03:01 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-02-22 19:03:01 -0300 |
commit | 3dddc69e55e7e614f5298067cf7d5f09a7343a59 (patch) | |
tree | fc55e190781c773be7fb48440bb30ef8bcb6f902 /files | |
parent | 742efcf6642962f6a76a667f563a4bb6a55db7a2 (diff) | |
download | puppet-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-media | 6 |
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 |