diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2011-05-09 16:52:01 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2011-05-09 16:52:01 -0300 |
commit | d50412d467bc8ca06321216d80c7cb6880a61eeb (patch) | |
tree | d886d6989c66dff00072bb0afe66ab33d1283a59 /templates/rsync-check.sh.erb | |
parent | 0152ea638ad8f34a1fab6136638290bce89096ac (diff) | |
download | puppet-backup-d50412d467bc8ca06321216d80c7cb6880a61eeb.tar.gz puppet-backup-d50412d467bc8ca06321216d80c7cb6880a61eeb.tar.bz2 |
Making rsync-check.sh more silent
Diffstat (limited to 'templates/rsync-check.sh.erb')
-rw-r--r-- | templates/rsync-check.sh.erb | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/templates/rsync-check.sh.erb b/templates/rsync-check.sh.erb index 879faaf..4997cfe 100644 --- a/templates/rsync-check.sh.erb +++ b/templates/rsync-check.sh.erb @@ -8,18 +8,29 @@ BACKUP_FOLDER="<%= backupdir_remote %>" if [ -e "$BACKUP_FOLDER" ]; then cwd="`pwd`" cd $BACKUP_FOLDER + + sets="`find -maxdepth 2 -name 'rsync' 2> /dev/null`" + if [ -z "$sets" ]; then + exit + fi - for set in `find -maxdepth 2 -name 'rsync'`; do - echo " " - echo "Checking backup set $set..." - echo "======================================================" - echo " " + for set in $sets; do + metadatas="`find $set -name 'created' 2> /dev/null`" + + if [ ! -z "$metadatas" ] || [ -d "$set/<%= backupdir %>/duplicity" ]; then + echo " " + echo "Checking backup set $set..." + echo "======================================================" + echo " " + fi # Check rsync metadata - for metadata in `find $set -name created`; do - echo $metadata - cat $metadata - done + if [ ! -z "$metadatas" ]; then + for metadata in $metadatas; do + echo $metadata + cat $metadata + done + fi # Check duplicity metadata if [ -d "$set/<%= backupdir %>/duplicity" ]; then |