Skip to content
Snippets Groups Projects
Commit fc1105f0 authored by Andres Maldonado's avatar Andres Maldonado
Browse files

[pica-db-backup][run.sh] Exit on failure of "children" scripts

This should kill the container if there were errors on one of the 
"children" scripts, making it more obvious that there was a problem.
parent a50cb267
No related branches found
No related tags found
No related merge requests found
Pipeline #60394 waiting for manual action
......@@ -84,6 +84,7 @@ for (( i=0; i < $NB_CALLS; i++ )); do
EXTRA_OPTS=${MYSQL_EXTRA_OPTS_ARRAY[i]} \
BACKUP_FOLDER="/backup/${MYSQL_BACKUP_FOLDER_ARRAY[i]}/" \
/scripts/mysql/mysql-run.sh
[ $? == 1 ] && exit 1
done
#Execute PostgreSQL backups
......@@ -101,6 +102,7 @@ for (( i=0; i < $NB_CALLS; i++ )); do
EXTRA_OPTS=${POSTGRES_EXTRA_OPTS_ARRAY[i]} \
BACKUP_FOLDER="/backup/${POSTGRES_BACKUP_FOLDER_ARRAY[i]}/" \
/scripts/postgresql/postgres-run.sh
[ $? == 1 ] && exit 1
done
#Execute MongoDB backups
......@@ -117,6 +119,7 @@ for (( i=0; i < $NB_CALLS; i++ )); do
CRON_TIME=${MONGO_CRON_TIME_ARRAY[i]} \
BACKUP_FOLDER="/backup/${MONGO_BACKUP_FOLDER_ARRAY[i]}/" \
/scripts/mongodb/mongo-run.sh
[ $? == 1 ] && exit 1
done
exec cron -f
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment