fixed restore
This commit is contained in:
parent
78c8fc4879
commit
e6da999edc
1 changed files with 2 additions and 2 deletions
|
@ -155,10 +155,10 @@ function restore_zammad () {
|
||||||
|
|
||||||
if [ "${DB_ADAPTER}" == "postgresql" ]; then
|
if [ "${DB_ADAPTER}" == "postgresql" ]; then
|
||||||
echo "# Restoring PostgrSQL DB"
|
echo "# Restoring PostgrSQL DB"
|
||||||
gunzip -ck < ${BACKUP_DIR}/${RESTORE_DB_DATE}_zammad_db.${DB_FILE_EXT}.gz | su -c "psql -d ${DB_NAME}" postgres
|
zcat ${BACKUP_DIR}/${RESTORE_DB_DATE}_zammad_db.${DB_FILE_EXT}.gz | su -c "psql -d ${DB_NAME}" postgres
|
||||||
elif [ "${DB_ADAPTER}" == "mysql2" ]; then
|
elif [ "${DB_ADAPTER}" == "mysql2" ]; then
|
||||||
echo "# Restoring MySQL DB"
|
echo "# Restoring MySQL DB"
|
||||||
gunzip -ck < ${BACKUP_DIR}/${RESTORE_DB_DATE}_zammad_db.${DB_FILE_EXT}.gz | mysql -u${DB_USER} -p${DB_PASS} ${DB_NAME}
|
zcat ${BACKUP_DIR}/${RESTORE_DB_DATE}_zammad_db.${DB_FILE_EXT}.gz | mysql -u${DB_USER} -p${DB_PASS} ${DB_NAME}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue