Added Maintenance mode to backup and restore
This commit is contained in:
parent
9fb75c395c
commit
030e09b5f5
2 changed files with 14 additions and 0 deletions
|
@ -3,6 +3,10 @@
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
|
|
||||||
|
#Start maintenance mode
|
||||||
|
/usr/local/bin/start-maintenance.sh
|
||||||
|
|
||||||
file_env AWS_ACCESS_KEY_ID
|
file_env AWS_ACCESS_KEY_ID
|
||||||
file_env AWS_SECRET_ACCESS_KEY
|
file_env AWS_SECRET_ACCESS_KEY
|
||||||
|
|
||||||
|
@ -37,6 +41,9 @@ function main() {
|
||||||
cd /var/backups/ && restic -v -r ${RESTIC_REPOSITORY}/files backup .
|
cd /var/backups/ && restic -v -r ${RESTIC_REPOSITORY}/files backup .
|
||||||
|
|
||||||
restic -v -r ${RESTIC_REPOSITORY}/files forget --keep-last 1 --keep-within ${RESTIC_DAYS_TO_KEEP}d --prune
|
restic -v -r ${RESTIC_REPOSITORY}/files forget --keep-last 1 --keep-within ${RESTIC_DAYS_TO_KEEP}d --prune
|
||||||
|
|
||||||
|
#End maintenance mode
|
||||||
|
/usr/local/bin/end-maintenance.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
source /usr/local/lib/functions.sh
|
source /usr/local/lib/functions.sh
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
|
|
||||||
|
#Start maintenance mode
|
||||||
|
/usr/local/bin/start-maintenance.sh
|
||||||
|
|
||||||
file_env AWS_ACCESS_KEY_ID
|
file_env AWS_ACCESS_KEY_ID
|
||||||
file_env AWS_SECRET_ACCESS_KEY
|
file_env AWS_SECRET_ACCESS_KEY
|
||||||
|
|
||||||
|
@ -34,6 +38,9 @@ function main() {
|
||||||
|
|
||||||
# adjust trusted domains
|
# adjust trusted domains
|
||||||
php /var/www/html/occ config:system:set trusted_domains 1 --value=cloud.test.meissa-gmbh.de
|
php /var/www/html/occ config:system:set trusted_domains 1 --value=cloud.test.meissa-gmbh.de
|
||||||
|
|
||||||
|
#End maintenance mode
|
||||||
|
/usr/local/bin/end-maintenance.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
source /usr/local/lib/functions.sh
|
source /usr/local/lib/functions.sh
|
||||||
|
|
Loading…
Reference in a new issue