- Used Zammad version: 7.0
- Used Zammad installation type: package
- Operating system: Ubuntu 24
Expected behavior:
The backup from version 6.5.2 should be imported into version 7.
Actual behavior:
The backup restore script runs through once, an error message related to Zeitwerk is thrown (I’m not sure if it’s related), and then Zammad doesn’t start up. Syslog also shows me something about this:
2026-03-05T07:41:34.933711+01:00 kvm12582 systemd[1]: zammad-web-1.service: Main process exited, code=exited, status=1/FAILURE
2026-03-05T07:41:34.933907+01:00 kvm12582 systemd[1]: zammad-web-1.service: Failed with result 'exit-code'.
2026-03-05T07:41:34.935586+01:00 kvm12582 systemd[1]: zammad-web-1.service: Consumed 6.045s CPU time.
2026-03-05T07:41:35.073332+01:00 kvm12582 systemd[1]: zammad-web-1.service: Scheduled restart job, restart counter is at 111.
2026-03-05T07:41:35.102000+01:00 kvm12582 systemd[1]: Started zammad-web-1.service.
2026-03-05T07:41:36.063421+01:00 kvm12582 zammad[29192]: I, [2026-03-05T07:41:36.060085#29192-6700] INFO -- : Using Zammad's file store as Rails cache store.
2026-03-05T07:41:36.066348+01:00 kvm12582 zammad[29192]: I, [2026-03-05T07:41:36.062188#29192-6700] INFO -- : Using the File back end for Zammad's web socket session store.
2026-03-05T07:41:36.133503+01:00 kvm12582 zammad[29192]: I, [2026-03-05T07:41:36.131956#29192-6700] INFO -- : ActionCable is using the redis instance at redis://localhost:6379.
^X2026-03-05T07:41:36.683840+01:00 kvm12582 zammad[29192]: bundler: failed to load command: script/websocket-server.rb (script/websocket-server.rb)
2026-03-05T07:41:36.688734+01:00 kvm12582 zammad[29192]: /opt/zammad/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.7.3/lib/zeitwerk/loader/callbacks.rb:31:in `on_file_autoloaded': expected file /opt/zammad/app/models/ai.rb to define constant Ai, but didn't (Zeitwerk::NameError)
2026-03-05T07:41:36.689048+01:00 kvm12582 zammad[29192]: raise Zeitwerk::NameError.new(msg, cref.cname)
2026-03-05T07:41:36.689347+01:00 kvm12582 zammad[29192]: ^^^^^
2026-03-05T07:41:36.689533+01:00 kvm12582 zammad[29192]: #011from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.7.3/lib/zeitwerk/core_ext/kernel.rb:27:in `require'
2026-03-05T07:41:36.692990+01:00 kvm12582 zammad[29192]: #011from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/activesupport-7.2.2.2/lib/active_support/inflector/methods.rb:290:in `const_get'
2026-03-05T07:41:36.693252+01:00 kvm12582 zammad[29192]: #011from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/activesupport-7.2.2.2/lib/active_support/inflector/methods.rb:290:in `constantize'
2026-03-05T07:41:36.693422+01:00 kvm12582 zammad[29192]: #011from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/activesupport-7.2.2.2/lib/active_support/core_ext/string/inflections.rb:74:in `constantize'
2026-03-05T07:41:36.693669+01:00 kvm12582 zammad[29192]: #011from /opt/zammad/lib/models.rb:44:in `block in all'
Steps to reproduce the behavior:
Restore a Backup from version 6.5.2 into 7 with the backup script.
/opt/zammad/contrib/backup# ./zammad_restore.sh
# Zammad restore started - Thu Mar 5 07:30:42 AM CET 2026!
The restore will delete your current database!
Be sure to have a backup available!
Please ensure to have twice the storage of the uncompressed backup size!
Note that the restoration USUALLY requires root permissions as services are stopped!
Enter 'yes' if you want to proceed!
Restore?: yes
Enter file date to restore:
20260119074411
File date: 20260119074411
Enter db date to restore:
20260119074411
DB date: 20260119074411
# Stopping Zammad
# Checking requirements
# ... Dropping current database zammad
Dropped database 'zammad'
# ... Creating database zammad for owner zammad
CREATE DATABASE
# Restoring PostgreSQL DB
# Restoring Files
# Ensuring correct file permissions ...
# Clearing Cache ...
I, [2026-03-05T07:31:34.677671#18339-6700] INFO -- : Using Zammad's file store as Rails cache store.
I, [2026-03-05T07:31:34.678636#18339-6700] INFO -- : Using the File back end for Zammad's web socket session store.
I, [2026-03-05T07:31:34.727623#18339-6700] INFO -- : ActionCable is using the redis instance at redis://localhost:6379.
/opt/zammad/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.7.3/lib/zeitwerk/loader/callbacks.rb:31:in `on_file_autoloaded': expected file /opt/zammad/app/models/ai.rb to define constant Ai, but didn't (Zeitwerk::NameError)
raise Zeitwerk::NameError.new(msg, cref.cname)
^^^^^
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.7.3/lib/zeitwerk/core_ext/kernel.rb:27:in `require'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/activesupport-7.2.2.2/lib/active_support/inflector/methods.rb:290:in `const_get'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/activesupport-7.2.2.2/lib/active_support/inflector/methods.rb:290:in `constantize'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/activesupport-7.2.2.2/lib/active_support/core_ext/string/inflections.rb:74:in `constantize'
from /opt/zammad/lib/models.rb:44:in `block in all'
from <internal:dir>:220:in `glob'
from /opt/zammad/lib/models.rb:34:in `all'
from /opt/zammad/config/initializers/models_preload.rb:7:in `block in <main>'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/activesupport-7.2.2.2/lib/active_support/callbacks.rb:407:in `instance_exec'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/activesupport-7.2.2.2/lib/active_support/callbacks.rb:407:in `block in make_lambda'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/activesupport-7.2.2.2/lib/active_support/callbacks.rb:179:in `block in call'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/activesupport-7.2.2.2/lib/active_support/callbacks.rb:668:in `block (2 levels) in default_terminator'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/activesupport-7.2.2.2/lib/active_support/callbacks.rb:667:in `catch'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/activesupport-7.2.2.2/lib/active_support/callbacks.rb:667:in `block in default_terminator'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/activesupport-7.2.2.2/lib/active_support/callbacks.rb:180:in `call'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/activesupport-7.2.2.2/lib/active_support/callbacks.rb:559:in `block in invoke_before'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/activesupport-7.2.2.2/lib/active_support/callbacks.rb:559:in `each'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/activesupport-7.2.2.2/lib/active_support/callbacks.rb:559:in `invoke_before'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/activesupport-7.2.2.2/lib/active_support/callbacks.rb:109:in `run_callbacks'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/activesupport-7.2.2.2/lib/active_support/reloader.rb:96:in `prepare!'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/railties-7.2.2.2/lib/rails/application/finisher.rb:74:in `block in <module:Finisher>'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/railties-7.2.2.2/lib/rails/initializable.rb:32:in `instance_exec'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/railties-7.2.2.2/lib/rails/initializable.rb:32:in `run'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/railties-7.2.2.2/lib/rails/initializable.rb:61:in `block in run_initializers'
from /opt/zammad/vendor/ruby-3.2.8/lib/ruby/3.2.0/tsort.rb:228:in `block in tsort_each'
from /opt/zammad/vendor/ruby-3.2.8/lib/ruby/3.2.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /opt/zammad/vendor/ruby-3.2.8/lib/ruby/3.2.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /opt/zammad/vendor/ruby-3.2.8/lib/ruby/3.2.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /opt/zammad/vendor/ruby-3.2.8/lib/ruby/3.2.0/tsort.rb:347:in `each'
from /opt/zammad/vendor/ruby-3.2.8/lib/ruby/3.2.0/tsort.rb:347:in `call'
from /opt/zammad/vendor/ruby-3.2.8/lib/ruby/3.2.0/tsort.rb:347:in `each_strongly_connected_component'
from /opt/zammad/vendor/ruby-3.2.8/lib/ruby/3.2.0/tsort.rb:226:in `tsort_each'
from /opt/zammad/vendor/ruby-3.2.8/lib/ruby/3.2.0/tsort.rb:205:in `tsort_each'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/railties-7.2.2.2/lib/rails/initializable.rb:60:in `run_initializers'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/railties-7.2.2.2/lib/rails/application.rb:435:in `initialize!'
from /opt/zammad/config/environment.rb:7:in `<main>'
from <internal:/opt/zammad/vendor/ruby-3.2.8/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
from <internal:/opt/zammad/vendor/ruby-3.2.8/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.7.3/lib/zeitwerk/core_ext/kernel.rb:34:in `require'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/railties-7.2.2.2/lib/rails/application.rb:411:in `require_environment!'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/railties-7.2.2.2/lib/rails/command/actions.rb:20:in `boot_application!'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/railties-7.2.2.2/lib/rails/commands/runner/runner_command.rb:30:in `perform'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/thor-1.4.0/lib/thor/command.rb:28:in `run'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/thor-1.4.0/lib/thor/invocation.rb:127:in `invoke_command'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/railties-7.2.2.2/lib/rails/command/base.rb:178:in `invoke_command'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/thor-1.4.0/lib/thor.rb:538:in `dispatch'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/railties-7.2.2.2/lib/rails/command/base.rb:73:in `perform'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/railties-7.2.2.2/lib/rails/command.rb:71:in `block in invoke'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/railties-7.2.2.2/lib/rails/command.rb:149:in `with_argv'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/railties-7.2.2.2/lib/rails/command.rb:69:in `invoke'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/railties-7.2.2.2/lib/rails/commands.rb:18:in `<main>'
from <internal:/opt/zammad/vendor/ruby-3.2.8/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
from <internal:/opt/zammad/vendor/ruby-3.2.8/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
from /opt/zammad/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from /opt/zammad/bin/rails:4:in `<main>'
# Starting Zammad
# Zammad restored successfully - Thu Mar 5 07:31:35 AM CET 2026!