use tar --overwrite instead of deleting zammad dir
This commit is contained in:
parent
3bcea0dfb9
commit
0d60e156e2
2 changed files with 1 additions and 8 deletions
|
@ -141,14 +141,9 @@ function stop_zammad () {
|
||||||
${INIT_CMD} stop zammad
|
${INIT_CMD} stop zammad
|
||||||
}
|
}
|
||||||
|
|
||||||
function delete_current_files () {
|
|
||||||
echo "# Deleting Zammad dir ${ZAMMAD_DIR}"
|
|
||||||
test -d ${ZAMMAD_DIR} && rm -rf ${ZAMMAD_DIR}
|
|
||||||
}
|
|
||||||
|
|
||||||
function restore_zammad () {
|
function restore_zammad () {
|
||||||
echo "# Restoring Files"
|
echo "# Restoring Files"
|
||||||
tar -C / -xzf ${BACKUP_DIR}/${RESTORE_FILE_DATE}_zammad_files.tar.gz
|
tar -C / --overwrite -xzf ${BACKUP_DIR}/${RESTORE_FILE_DATE}_zammad_files.tar.gz
|
||||||
|
|
||||||
if [ "${DB_ADAPTER}" == "postgresql" ]; then
|
if [ "${DB_ADAPTER}" == "postgresql" ]; then
|
||||||
echo "# Restoring PostgrSQL DB"
|
echo "# Restoring PostgrSQL DB"
|
||||||
|
|
|
@ -26,8 +26,6 @@ detect_initcmd
|
||||||
|
|
||||||
stop_zammad
|
stop_zammad
|
||||||
|
|
||||||
delete_current_files
|
|
||||||
|
|
||||||
restore_zammad
|
restore_zammad
|
||||||
|
|
||||||
start_zammad
|
start_zammad
|
||||||
|
|
Loading…
Reference in a new issue