enable restore parameter

This commit is contained in:
Michael Jerger 2023-03-10 15:43:21 +01:00
parent 1757fcebb9
commit 2c0f340903
2 changed files with 9 additions and 7 deletions

View file

@ -1,4 +1,4 @@
FROM domaindrivenarchitecture/dda-backup:1.0.5
FROM domaindrivenarchitecture/dda-backup:1.0.7
# Prepare Entrypoint Script
ADD resources /tmp

View file

@ -3,6 +3,10 @@
set -Eeox pipefail
function main() {
local role_snapshot_id="${1:-latest}"; shift
local db_snapshot_id="${1:-latest}"; shift
local file_snapshot_id="${1:-latest}"; shift
start-maintenance.sh
@ -15,17 +19,15 @@ function main() {
drop-create-db
restore-roles
restore-db
restore-directory '/var/backups/'
restore-roles ${role_snapshot_id}
restore-db ${db_snapshot_id}
restore-directory '/var/backups/' ${file_snapshot_id}
end-maintenance.sh
}
source /usr/local/lib/functions.sh
source /usr/local/lib/pg-functions.sh
source /usr/local/lib/file-functions.sh
main
main "$@"