13 changed files with 73 additions and 24 deletions
@ -0,0 +1,17 @@
|
||||
--- |
||||
repos: |
||||
- repo: https://github.com/pre-commit/pre-commit-hooks |
||||
rev: v4.0.1 |
||||
hooks: |
||||
- id: check-merge-conflict |
||||
- id: check-yaml |
||||
- id: end-of-file-fixer |
||||
- repo: https://github.com/shellcheck-py/shellcheck-py |
||||
rev: v0.7.2.1 |
||||
hooks: |
||||
- id: shellcheck |
||||
- repo: https://github.com/IamTheFij/docker-pre-commit |
||||
rev: v2.0.0 |
||||
hooks: |
||||
- id: docker-compose-check |
||||
- id: hadolint |
@ -1,25 +1,26 @@
|
||||
#! /bin/bash |
||||
set -e |
||||
|
||||
restore_snapshot=$1 |
||||
restore_snapshot="$1" |
||||
|
||||
# Run pre-restore scripts |
||||
for f in /scripts/restore/before/*; do |
||||
if [ -f $f -a -x $f ]; then |
||||
bash $f |
||||
if [ -f "$f" ] && [ -x "$f" ]; then |
||||
bash "$f" |
||||
fi |
||||
done |
||||
|
||||
# shellcheck disable=SC2086 |
||||
restic \ |
||||
-r $BACKUP_DEST \ |
||||
-r "$BACKUP_DEST" \ |
||||
$OPT_ARGUMENTS \ |
||||
restore \ |
||||
$restore_snapshot \ |
||||
"$restore_snapshot" \ |
||||
-t / |
||||
|
||||
# Run post-restore scripts |
||||
for f in /scripts/restore/after/*; do |
||||
if [ -f $f -a -x $f ]; then |
||||
bash $f |
||||
if [ -f "$f" ] && [ -x "$f" ]; then |
||||
bash "$f" |
||||
fi |
||||
done |
||||
|
@ -1,3 +1,4 @@
|
||||
#! /bin/bash |
||||
set -e |
||||
|
||||
# Don't really need to do anything here |
||||
|
Loading…
Reference in new issue