update_nextcloud.sh: Fix error eupdateing postgres database.
This commit is contained in:
parent
86318dd37a
commit
d8b9e7726b
@ -550,7 +550,9 @@ if [[ "$DATABASE_TYPE" = 'mysql' ]]; then
|
||||
fatal "$(cat $log_file)"
|
||||
fi
|
||||
elif [[ "$DATABASE_TYPE" = 'postgres' ]]; then
|
||||
PGPASSWORD=$PSQL_PASS pg_dump $DATABASE_NAME -h $PSQL_SERVER -U $PSQL_USER -f postfix-${backup_date}.sql
|
||||
PGPASSWORD=$PSQL_PASS \
|
||||
pg_dump $DATABASE_NAME -h $PSQL_SERVER -U $PSQL_USER \
|
||||
-f ${WEB_BASE_DIR}/${DATABASE_NAME}-v${PRIOR_VERSION}.${backup_date}.sql 2> $log_file
|
||||
if [[ $? -eq 0 ]]; then
|
||||
echo_ok
|
||||
else
|
||||
@ -567,7 +569,16 @@ if [[ $? -eq 0 ]]; then
|
||||
echo_ok
|
||||
else
|
||||
echo_failed
|
||||
fatal "$(cat $log_file)"
|
||||
error "$(cat $log_file)"
|
||||
|
||||
echononl "continue anyway [yes/no]: "
|
||||
read OK
|
||||
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
|
||||
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
|
||||
echononl "Wrong entry! - repeat [yes/no]: "
|
||||
read OK
|
||||
done
|
||||
[[ $OK = "yes" ]] || fatal "Interrupted ny user."
|
||||
fi
|
||||
mkdir ${WEB_BASE_DIR}/nextcloud-${VERSION} > $log_file 2>&1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user