enable restore parameter
This commit is contained in:
parent
1757fcebb9
commit
2c0f340903
2 changed files with 9 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
||||||
FROM domaindrivenarchitecture/dda-backup:1.0.5
|
FROM domaindrivenarchitecture/dda-backup:1.0.7
|
||||||
|
|
||||||
# Prepare Entrypoint Script
|
# Prepare Entrypoint Script
|
||||||
ADD resources /tmp
|
ADD resources /tmp
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
set -Eeox pipefail
|
set -Eeox pipefail
|
||||||
|
|
||||||
function main() {
|
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
|
start-maintenance.sh
|
||||||
|
|
||||||
|
@ -15,17 +19,15 @@ function main() {
|
||||||
|
|
||||||
drop-create-db
|
drop-create-db
|
||||||
|
|
||||||
restore-roles
|
restore-roles ${role_snapshot_id}
|
||||||
restore-db
|
restore-db ${db_snapshot_id}
|
||||||
restore-directory '/var/backups/'
|
restore-directory '/var/backups/' ${file_snapshot_id}
|
||||||
|
|
||||||
end-maintenance.sh
|
end-maintenance.sh
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
source /usr/local/lib/functions.sh
|
source /usr/local/lib/functions.sh
|
||||||
source /usr/local/lib/pg-functions.sh
|
source /usr/local/lib/pg-functions.sh
|
||||||
source /usr/local/lib/file-functions.sh
|
source /usr/local/lib/file-functions.sh
|
||||||
|
|
||||||
main
|
main "$@"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue