In the short term, we want to move the current Zammad installation running on CentOS7 to a new server / provider.
Here we have 2 options:
migrate to a new CentOS7 environment and restore the environment through backup / restore;
migrate to a new Ubuntu environment.
I am curious about the opinion of others? Is a migration to Ubuntu doable? Or is the advise not to do so when coming from CentOS7? And what is the advice to transfer data then?
I would suggest you contact sales@zammad.com ⦠No just kidding.
You could do it this way:
Stop all Zammad services and check if they are inactive (may take some time)
Create a postgresql/MySQL/MariaDB Dump which contains your Zammad
Install Zammad, same patchlevel as on the old system
Install and configure Database and Webserver
Import your dump
Modify your /opt/zammad/config/database.yml to macht the new settings (user&pass)
Restart all the services
You can also use our backup script, I prefer to do it manually.
Those steps are āuniversalā you could transfer Zammad to any OS (except Windows). Which OS you use is totally up to you. We use CentOS and have no issues.
regards
EDIT:
And when you are done with the migration itself, you can update to the latest Zammad using apt / yum.
Why not upgrade before migrating? just wondering cause I think its easier to download a fresh updated copy of Zammad to install on the new system than find the exact same version of the system you are currently running.
Thank you for the responses, good to know in advance that there wonāt be any ācomplexityā to be awaited when migrating. In the way with upgrading both OS and Zammad first would sound logical to me also. We have the possibility to upgrade first, no problem there.
At this moment we are using CentOS. No problems there also, but since we are also using some software packages that runs mandatory on Ubuntu or at least are better supported on Ubuntu, we are now examine the possibilities to run the other systems also on Ubuntu.
I will try to do a test migration later on next week, true the steps Hannes described. Wāll keep u posted on my findings and outcome on that
Unfortunately the first experiences wit migrating didnāt made happy so far. After restoring the database on the new environment some things are not function normally.
What I did:
Steps 1 till 5, at which I import the .psql dump that Iāve exracted from the back-up file. That way I even do not have to change the database.yml file, since nothing did change.
The weird thing is however, that when Iāve tried to login i canāt. When logging in into a user account I can login, and I can see the overviews and tickets that are belonging to that account. When loggin in into an admin / agent account however Iāve receive a white screen.
Do you guys have any idea what this could be? How this could be solved?
Little sidenote: I also tried to move the database and settings by using the back-up and restore script. That however resolved in a server with a lot of 502 page not found error pages, and a lot of information being written into the log files (a lot of errors). For a CentOS to Ubuntu migration, that is not a good solution, or I am doing something terrible wrong.
Wel this definitely clear some things up At the step: Install Zammad on the new OS -> I missed the āDonāt start the servicesā. Actually, since I use Ubuntu, this seems to be something that cannot be āskippedā since the installer wil start the services automatically after finishing the installation.
At the moment Iām downloading all attachments again to the new server. Importing the database failed unfortunately, got a lot of errors of duplicate records (see below). So thatās a new one to figure outā¦
setval
15139
(1 row)
ERROR: duplicate key value violates unique constraint āstore_objects_pkeyā
DETAIL: Key (id)=(1) already exists.
CONTEXT: COPY store_objects, line 1
setval
and erros like these:
ERROR: constraint āfk_rails_e85422db7eā for relation ārolesā already exists
or these
ERROR: multiple primary keys for table āticket_countersā are not allowed
When I migrated by private instance from A to B I simply used the provided backup script.
Stopped Zammad on Host A, ran the Backup-Script and transfered it to Host B.
I then installed Zammad there (it got automatically started), stopped Zammad on Host B and restored the backup via provided script.
Had no trouble with that.
In your case it looks like the database hasnāt been dropped.
In the meantime I managed to get it working. I already figured out that the migration from CentOS7 to Ubuntu will not work when using the provided backup script. It will throw errors all over.
In the end Iāve got it working by following the steps Johannes provided. The problems with restoring the database got covered by making a complete dump of the database on the CentOS7 environment with the function pg-dump. Restoring the database succeeded when giing a couple of extra parameters to truncate the database first.