aboutsummaryrefslogtreecommitdiff
path: root/templates/rdiff-check.sh.erb
blob: 229aced311821e37398c91c76f39d94add34bb62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
#
# Check rdiff backup sets.
#

BACKUP_FOLDER="<%= backupdir_remote %>"

if [ -e "$BACKUP_FOLDER" ]; then
  cwd="`pwd`"
  cd $BACKUP_FOLDER
  
  for set in `find -maxdepth 2 -name 'rdiff'`; do
    echo "Checking backup set $set..."
    rdiff-backup --list-increment-sizes $set;

    if [ -d "$set/<%= backupdir %>/duplicity" ]; then
      echo "Checking duplicity backup found at $set/<%= backupdir %>/duplicity..."
      duplicity collection-status file:///$BACKUP_FOLDER/$set/<%= backupdir %>/duplicity
    fi
  done
  
  cd $cwd
fi