docker-duplicity-cron/scripts/restore.sh
Ian 8de29d1fab Move scripts to subdir
Cleaning up the root directory
2018-08-15 19:13:39 -07:00

19 lines
384 B
Bash
Executable File

#! /bin/bash
set -e
(
if ! flock -x -w $FLOCK_WAIT 200 ; then
echo 'ERROR: Could not obtain lock. Exiting.'
exit 1
fi
duplicity restore \
--force \
--log-file /root/duplicity.log \
--name $BACKUP_NAME \
$OPT_ARGUMENTS \
$@ \
$BACKUP_DEST \
$PATH_TO_BACKUP
) 200>/var/lock/duplicity/.duplicity.lock