From d4c85a48f643805f88345387979ba3f2b33187f8 Mon Sep 17 00:00:00 2001 From: Michael Jerger Date: Fri, 10 Mar 2023 15:43:58 +0100 Subject: [PATCH] add missing file-snapshot --- .../docker/image/resources/file-functions.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/infrastructure/docker/image/resources/file-functions.sh b/infrastructure/docker/image/resources/file-functions.sh index 76a709d..fd19b2e 100644 --- a/infrastructure/docker/image/resources/file-functions.sh +++ b/infrastructure/docker/image/resources/file-functions.sh @@ -57,4 +57,13 @@ function restore-directory() { restic -v -r $RESTIC_REPOSITORY/${backup_file_path} restore ${snapshot_id} --target ${directory} --cacert ${CERTIFICATE_FILE} fi -} \ No newline at end of file +} + +function list-snapshot-files() { + if [ -z ${CERTIFICATE_FILE} ]; + then + restic -r ${RESTIC_REPOSITORY}/${backup_file_path} snapshots + else + restic -r ${RESTIC_REPOSITORY}/${backup_file_path} snapshots --cacert ${CERTIFICATE_FILE} + fi +}