Mercurial > public > ssdt-docker
annotate scripts/restore-container.sh @ 587:2bd96ab37a7a production
Added tag v2.19.0 for changeset f897ce55c610
author | Marc Davis <marc.davis@mcoecn.org> |
---|---|
date | Thu, 05 Sep 2024 14:09:51 -0400 |
parents | 5be78ce3b33c |
children |
rev | line source |
---|---|
225
2e0d3c70bba2
replace restore scripts with updated container restore script
smith@nwoca.org
parents:
diff
changeset
|
1 #!/bin/bash |
2e0d3c70bba2
replace restore scripts with updated container restore script
smith@nwoca.org
parents:
diff
changeset
|
2 |
2e0d3c70bba2
replace restore scripts with updated container restore script
smith@nwoca.org
parents:
diff
changeset
|
3 source "${SSDT_SCRIPTS:-$(dirname "${BASH_SOURCE[0]}")}/.functions.sh" |
2e0d3c70bba2
replace restore scripts with updated container restore script
smith@nwoca.org
parents:
diff
changeset
|
4 |
2e0d3c70bba2
replace restore scripts with updated container restore script
smith@nwoca.org
parents:
diff
changeset
|
5 sourceFile=${1?must provide backup file to be restored} |
2e0d3c70bba2
replace restore scripts with updated container restore script
smith@nwoca.org
parents:
diff
changeset
|
6 |
2e0d3c70bba2
replace restore scripts with updated container restore script
smith@nwoca.org
parents:
diff
changeset
|
7 if [ -z "$1" ] |
2e0d3c70bba2
replace restore scripts with updated container restore script
smith@nwoca.org
parents:
diff
changeset
|
8 then |
2e0d3c70bba2
replace restore scripts with updated container restore script
smith@nwoca.org
parents:
diff
changeset
|
9 echo "Usage: `basename $0` {backup file to restore}" |
2e0d3c70bba2
replace restore scripts with updated container restore script
smith@nwoca.org
parents:
diff
changeset
|
10 echo " must specify the name of the file to restore. Assumed to be in format:" |
2e0d3c70bba2
replace restore scripts with updated container restore script
smith@nwoca.org
parents:
diff
changeset
|
11 echo " {service}.{timestamp}.backup.gz " |
2e0d3c70bba2
replace restore scripts with updated container restore script
smith@nwoca.org
parents:
diff
changeset
|
12 echo " where {service} is the usasdb or uspsdb container to be restored." |
2e0d3c70bba2
replace restore scripts with updated container restore script
smith@nwoca.org
parents:
diff
changeset
|
13 echo " The script will restore the backup to the appropriate container based " |
2e0d3c70bba2
replace restore scripts with updated container restore script
smith@nwoca.org
parents:
diff
changeset
|
14 echo " on the filename." |
2e0d3c70bba2
replace restore scripts with updated container restore script
smith@nwoca.org
parents:
diff
changeset
|
15 exit $E_NOARGS |
2e0d3c70bba2
replace restore scripts with updated container restore script
smith@nwoca.org
parents:
diff
changeset
|
16 fi |
2e0d3c70bba2
replace restore scripts with updated container restore script
smith@nwoca.org
parents:
diff
changeset
|
17 |
2e0d3c70bba2
replace restore scripts with updated container restore script
smith@nwoca.org |