mirror of
https://github.com/ViViDboarder/docker-restic-cron.git
synced 2024-11-15 01:36:37 +00:00
26 lines
393 B
Bash
Executable File
26 lines
393 B
Bash
Executable File
#! /bin/bash
|
|
set -e
|
|
|
|
restore_snapshot=$1
|
|
|
|
# Run pre-restore scripts
|
|
for f in /scripts/restore/before/*; do
|
|
if [ -f $f -a -x $f ]; then
|
|
bash $f
|
|
fi
|
|
done
|
|
|
|
restic \
|
|
-r $BACKUP_DEST \
|
|
$OPT_ARGUMENTS \
|
|
restore \
|
|
$restore_snapshot \
|
|
-t /
|
|
|
|
# Run post-restore scripts
|
|
for f in /scripts/restore/after/*; do
|
|
if [ -f $f -a -x $f ]; then
|
|
bash $f
|
|
fi
|
|
done
|