From 24d15d7bd45d6d4d12598e05c206d326a68cada9 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Thu, 3 Dec 2020 10:13:04 +0100 Subject: [PATCH] Fixes #3324 - Migrating to another host causes Login to fail. --- contrib/backup/functions | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contrib/backup/functions b/contrib/backup/functions index 361ba641f..0700aeb8a 100644 --- a/contrib/backup/functions +++ b/contrib/backup/functions @@ -199,6 +199,14 @@ function restore_zammad () { # See #3160 for the reasons of this :> restore_files fi + + # Ensure all data is loaded from the restored database and not the cache of the previous system state + echo "# Clearing Cache ..." + if command -v zammad > /dev/null; then + zammad run rails r "Cache.clear" + else + ${ZAMMAD_DIR}/bin/rails r "Cache.clear" + fi } function restore_files () {