Browse Source

Fixes #3324 - Migrating to another host causes Login to fail.

Thorsten Eckel 4 years ago
parent
commit
24d15d7bd4
1 changed files with 8 additions and 0 deletions
  1. 8 0
      contrib/backup/functions

+ 8 - 0
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 () {