Supporting adjust volume size & pre-update backups.
This commit is contained in:
@@ -25,6 +25,7 @@ while read -u 3 msg; do
|
||||
tag=$1
|
||||
request_id=$2
|
||||
path=$3 # TODO not currently used
|
||||
restart=$4 # if we should restart the databases after the snapshot or stay in maintenance mode
|
||||
|
||||
# update status for webhooks
|
||||
printf "%s\n" "running" > "/tmp/restic/snapshot_status_$request_id"
|
||||
@@ -60,27 +61,29 @@ while read -u 3 msg; do
|
||||
# perform the snapshot
|
||||
docker run --rm --volume /nassella:/nassella --volume /restic-password:/restic-password -e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} -e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} -i restic/restic:0.18.0 backup --verbose --repo s3:${BACKBLAZE_BUCKET_URL} --password-file /restic-password --tag "$tag" "/nassella"
|
||||
|
||||
# restart databases
|
||||
if [ $ghost_db_running = true ]; then
|
||||
docker start app-ghost_db-1
|
||||
fi
|
||||
if [ $nassella_lldap_db_running = true ]; then
|
||||
docker start app-nassella_lldap_db-1
|
||||
fi
|
||||
if [ $nassella_authelia_db_running = true ]; then
|
||||
docker start app-nassella_authelia_db-1
|
||||
fi
|
||||
if [ $nassella_db_running = true ]; then
|
||||
docker start app-nassella_db-1
|
||||
fi
|
||||
if [ $nextcloud_db_running = true ]; then
|
||||
docker start app-nextcloud_db-1
|
||||
fi
|
||||
if [ $nextcloud_redis_running = true ]; then
|
||||
docker start app-nextcloud_redis-1
|
||||
fi
|
||||
if [ $restart = "true" ]; then
|
||||
# restart databases
|
||||
if [ $ghost_db_running = true ]; then
|
||||
docker start app-ghost_db-1
|
||||
fi
|
||||
if [ $nassella_lldap_db_running = true ]; then
|
||||
docker start app-nassella_lldap_db-1
|
||||
fi
|
||||
if [ $nassella_authelia_db_running = true ]; then
|
||||
docker start app-nassella_authelia_db-1
|
||||
fi
|
||||
if [ $nassella_db_running = true ]; then
|
||||
docker start app-nassella_db-1
|
||||
fi
|
||||
if [ $nextcloud_db_running = true ]; then
|
||||
docker start app-nextcloud_db-1
|
||||
fi
|
||||
if [ $nextcloud_redis_running = true ]; then
|
||||
docker start app-nextcloud_redis-1
|
||||
fi
|
||||
|
||||
rm /app/maintenance/maintenance.on
|
||||
rm /app/maintenance/maintenance.on
|
||||
fi
|
||||
|
||||
# update status for webhooks
|
||||
printf "%s\n" "complete" > "/tmp/restic/snapshot_status_$request_id"
|
||||
|
||||
Reference in New Issue
Block a user