No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

restore.sh 685B

123456789101112131415161718192021222324252627282930313233
  1. #! /bin/bash
  2. set -e
  3. (
  4. if ! flock -x -w $FLOCK_WAIT 200 ; then
  5. echo 'ERROR: Could not obtain lock. Exiting.'
  6. exit 1
  7. fi
  8. # Run pre-restore scripts
  9. for f in /scripts/restore/before/*; do
  10. if [ -f $f -a -x $f ]; then
  11. bash $f
  12. fi
  13. done
  14. duplicity restore \
  15. --force \
  16. --log-file /root/duplicity.log \
  17. --name $BACKUP_NAME \
  18. $OPT_ARGUMENTS \
  19. $@ \
  20. $BACKUP_DEST \
  21. $PATH_TO_BACKUP
  22. # Run post-restore scripts
  23. for f in /scripts/restore/after/*; do
  24. if [ -f $f -a -x $f ]; then
  25. bash $f
  26. fi
  27. done
  28. ) 200>/var/lock/duplicity/.duplicity.lock