restore_nextcloud.sh: minor changes on script output

This commit is contained in:
Christoph 2021-02-06 10:38:03 +01:00
parent 74115ac714
commit 84c890dfcd

View File

@ -429,30 +429,6 @@ echo ""
DATA_DIR=${WEB_BASE_DIR}/data-${VERSION}
INSTALL_DIR=${WEB_BASE_DIR}/nextcloud-${VERSION}
echononl " Restore Database - \033[5m\033[1mmay take a long time\033[m"
echo_wait
if [[ "$DATABASE_TYPE" = 'mysql' ]]; then
#mysql $MYSQL_CREDENTIALS $DATABASE_NAME < \
# ${WEB_BASE_DIR}/${DATABASE_NAME}-v${RESTORE_VERSION}.${DATE_RESTORE_VERSION}.sql 2> $log_file
sleep 10
if [[ $? -eq 0 ]]; then
echo_ok
else
echo_failed
fatal "$(cat $log_file)"
fi
elif [[ "$DATABASE_TYPE" = 'postgres' ]]; then
PGPASSWORD=$PSQL_PASS \
pg_dump $DATABASE_NAME -h $PSQL_SERVER -U $PSQL_USER \
-f ${WEB_BASE_DIR}/${DATABASE_NAME}-v${RESTORE_VERSION}.${DATE_RESTORE_VERSION}.sql 2> $log_file
if [[ $? -eq 0 ]]; then
echo_ok
else
echo_failed
fatal "$(cat $log_file)"
fi
fi
clean_up 0
# - Deaktiviere Cronjobs
# -