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 +}