diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2010-08-18 15:53:26 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2010-08-18 15:53:26 -0300 |
commit | 368661f49eb14dd8e0df157f071ae0cb08fbf8b3 (patch) | |
tree | 1f337b2adbb9e98aff59b90ebabf3675cf55ca1f /templates | |
parent | b93dc21e850e1914a7377378604acf9ca8a14713 (diff) | |
download | puppet-backup-368661f49eb14dd8e0df157f071ae0cb08fbf8b3.tar.gz puppet-backup-368661f49eb14dd8e0df157f071ae0cb08fbf8b3.tar.bz2 |
Adding rsync-check
Diffstat (limited to 'templates')
-rw-r--r-- | templates/rsync-check.sh.erb | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/templates/rsync-check.sh.erb b/templates/rsync-check.sh.erb new file mode 100644 index 0000000..e945b8c --- /dev/null +++ b/templates/rsync-check.sh.erb @@ -0,0 +1,34 @@ +#!/bin/bash +# +# Check rsync backup sets. +# + +BACKUP_FOLDER="<%= backupdir_remote %>" + +if [ -e "$BACKUP_FOLDER" ]; then + cwd="`pwd`" + cd $BACKUP_FOLDER + + for set in `find -maxdepth 2 -name 'rsync'`; do + echo " " + echo "Checking backup set $set..." + echo "======================================================" + echo " " + + # Check rsync metadata + for metadata in `find $set -name created`; do + echo $metadata + cat $metadata + done + + if [ -d "$set/<%= backupdir %>/duplicity" ]; then + echo " " + echo "Checking duplicity backup found at $set/<%= backupdir %>/duplicity..." + echo "======================================================" + echo " " + duplicity collection-status file:///$BACKUP_FOLDER/$set/<%= backupdir %>/duplicity + fi + done + + cd $cwd +fi |