Is the OTRS/Znuny DBUpdate-to-X.pl script idempotent/re-run-able?

In our case we have seldom the luck, that the upgrade of OTRS / Znuny is working like charm and runs of first execution.
We are using OTRS / Znuny since version 1.0 and we have never had a clean upgrade!

Before going on, lets clarify idempotent. This means you can re-run multiple times a function, a script or code which will ensure that you have exactly one result independently if you have issues on the path in between.

Luckily the developer of OTRS / Znuny have implemented a clean idempotent upgrade script, which you can run multiple times. E.g. DDLs for databases are not idempotent and thus once they have been executed the re-execution is not possible. But it depends if the developers have included some detection for execution. If you want to dig deeper here is a very good article how to manage a database like a source repository with liquibase

But getting back to OTRS / Znuny let us do following example.
You execute the upgrade from OTRS 5 to 6, for this you have to execute:

cd /opt/otrs
sudo -u otrs scripts/DBUpdate-to-6.pl

This script is is idempotent, that means if the script fails you can re-run the script once more.

Related articles

Related articles may be:

Do you need help with Znuny / OTRS?​

Do you require experts with real expertise since 2006 on Znuny and OTRS?
Do you require help on solving your issues?

We have experts who can help you on:
– giving you hands-on support
– implementing  custom solutions inside your OTRS/Znuny
– Integration existing Solutions into your Znuny
– Integrating artificial intelligence into your Znuny7OTRS and proce3sses

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

Leave a Reply