Migration to new server not working

Infos:

  • Used Zammad version: latest
  • Used Zammad installation source: (source, package, …) RPM
  • Operating system: CentOS7
  • Browser + version: Mozilla

Expected behavior:

Migration successful
*

Actual behavior:

Migration fails at importing DB
*

Steps to reproduce the behavior:

Hello Community,

I am trying to migrate an existing zammad installation from 2.6.x to a new server. I installed latest version via RPM by using this wiki:

https://docs.zammad.org/en/latest/install/centos.html

Then I made a backup using this wiki:

https://docs.zammad.org/en/latest/appendix/backup-and-restore.html#migrating-from-another-zammad-host

Zammad service is disabled and stoped. When restoring the DB i receive errors:

double key value violates unique constraint - Maybe because I tried the restore more than once?

ERROR: Inserting or updating in table “roles_users” violates foreign key constraint “fk_rails_e2a7142459”
DETAIL: Key (user_id) = (3) does not exist in the »users« table.

Above error I saw the first time I tried to restore.

What should I do? I assume I must drop the DB now, that does not work as well:

zammad run rake db:drop rake is instantly abborted. I have a snapshot of the machine prior to installing zammad.

Can you please help?

Thank you!

So I thing I managed to manually import the DB from a plain text. For this I had to remove one command.
Unfortunateley I cannot run zammad run rake db_migrate.

I am attaching the error:

Blockquote

** Invoke db:migrate (first_time)
** Invoke db:load_config (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:load_config
** Execute db:migrate
== 20190415000001 SettingEsMultiIndex: migrating ==============================
== 20190415000001 SettingEsMultiIndex: migrated (0.0090s) =====================

== 20190418000000 NormalizeSettingTicketNumberIgnoreSystemId: migrating =======
== 20190418000000 NormalizeSettingTicketNumberIgnoreSystemId: migrated (0.0147s)

== 20190531180304 InitializeKnowledgeBase: migrating ==========================
– create_table(:knowledge_bases, {:id=>:integer})
-> 0.1069s
– create_table(:knowledge_base_locales, {:id=>:integer})
-> 0.0075s
– create_table(:knowledge_base_translations, {:id=>:integer})
-> 0.0065s
– create_table(:knowledge_base_categories, {:id=>:integer})
-> 0.0076s
– create_table(:knowledge_base_category_translations, {:id=>:integer})
-> 0.0057s
– create_table(:knowledge_base_answers, {:id=>:integer})
-> 0.0140s
– create_table(:knowledge_base_answer_translation_contents, {:id=>:integer})
-> 0.0024s
– create_table(:knowledge_base_answer_translations, {:id=>:integer})
-> 0.0121s
– create_table(:knowledge_base_menu_items, {:id=>:integer})
-> 0.0080s
== 20190531180304 InitializeKnowledgeBase: migrated (0.2963s) =================

rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::UndefinedTable: FEHLER: Relation »active_job_locks« existiert nicht
LINE 8: WHERE a.attrelid = ‘“active_job_locks”’::regc…
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod,
c.collname, col_description(a.attrelid, a.attnum) AS comment
FROM pg_attribute a
LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum
LEFT JOIN pg_type t ON a.atttypid = t.oid
LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation
WHERE a.attrelid = ‘“active_job_locks”’::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum

Blockquote

zammad run rake db:version
Current version: 20190531180304

I added the version in the plain text versions, but same error…