Prepare / start a upgrade / migration of OTRS / Znuny

How to get started?

The best way to start with an upgrade, a change or a migration from OTRS to Znuny is to have a clone or a new instance of your current environment, there you can run the migration tests before doing on production.

You are on VMware, proxmox, Hyper-V or other virtualized environments?

If you have a virtual environment you may already be a very lucky admin. You can easily clone your instance based on snapshots and run your tests, without messing around with the production environment. Also nearly all other virtual environments have solutions like snapshots.

If you have a solution which is installed directly on hardware without a virtualizer, you can do also the same by cloning the server into a virtual environment. E.g. on VMware it is called VMware (vCenter) Converter, which is able to clone any operating system into a virtual environment. You could also use any desktop virtualizer like Virtual Box.

If you do not have these virtualization options it will get harder but still possible to solve. In this case you should restore your system from backup on a new system/hardware.

In any case DO NOT START your new machine without reading next chapter!

Highly critical steps before starting

After cloning or restoring from backup, you have a fully identical copy of production. This is great but also a root cause for many lost e-mails or tickets!

Your new environment is fetching also e-mails from pop3 or imap if you have configured the services accordingly. Means if you do not ensure, that the fetching is disabled your will run into a hell of a mess. The more messages you receive per hour, the bigger your pain will be.

In any case on virtual environments:
ensure on your newly cloned system that your network connectivity is disabled
This ensures that your new server is impossible to fetch or receive new messages from any mailbox at all.

In any case on physical hardware environments:
ensure the network cable is un-plugged
and if you run on PCs or laptops your tests, no network is available via alternative paths like WiFi or via mobile networks

After starting the new server you should disable all services which may cause you issues:

sudo service cron stop
sudo -u otrs /opt/otrs/bin/Cron.sh stop
sudo -u otrs /opt/otrs/bin/otrs.Daemon.pl stop
sudo service postfix stop
sudo service apache2 stop

Now you have a system which is cleanly stopped. Since we are paranoid on ensuring to avoid any possible risks on the mess, we do also

sudo update-rc.d cron disable
sudo update-rc.d postfix disable
sudo update-rc.d apache2 disable
reboot

Now check after the reboot, that cron, postfix and apache2 are disabled.

service apache2 status|grep "Active"

and you will get hopefully the status inactive (dead) like

Active: inactive (dead) since Thu 2022-02-17 20:52:50 CET; 1s ago

Do the same checks with

service cron status|grep "Active"
service postfix status|grep "Active"

If all services are inactive, you are fine to enable the network interface or to plug the network cable in.

Don’t be a fool, create a backup!

Do not go on without ensuring a backup of your data. There is a high probability of a migration failure.

Creating a snapshot as a backup

Create a clean snapshot. For the snapshots I recommend you to

sudo shutdown -h now

and after virtual machine is halted to create a clean snapshot.
For backup solutions ensure, that the backup is taking clean “snapshotted” database backups.

Create a backup with OTRS scripts

Alternatively create a backup with OTRS scripts. We recommend to do the paranoid double backup 😉
In this example the backup gets created in the folder /tmp/backup (missing folders are auto-created).
Of course you should use a folder, which will not be deleted on each reboot 😉

cd /opt/otrs
./scripts/backup.pl -d /tmp/backup

Related articles

Do you need help with Znuny / OTRS?
We have lot of experiences with OTRS and Znuny and can help you with your issues. Get in touch with us and we will check if and how we can help you.

Leave a Comment

Do you need help with Znuny / OTRS?​

We have lot of experiences with OTRS and Znuny.
We can help you with your issues to solve them.

From giving you support up to implementing integrations to your existing systems.

Get in touch with us and we will check if and how we can help you.​