There may be good reasons to operate i-doit in Windows. However, due to various reasons we recommend the use of Linux. But how do we transfer the well-established IT-documentation in an ongoing operation from one system to another as smooth as possible?
Preparation and Assumptions
Before starting, a few things should be kept in mind. The objective is to migrate without a long downtime and especially without data loss.
Everyone involved in working with data of i-doit should be informed about the migration in due time. Nothing is worse than angry colleagues whose work flow has been interrupted.
Additionally, all ports that will be used in accordance with i-doit should be identified. Specifically: Which third-party systems, such as Nagios, OTRS & Co., access i-doit? During the migration, the data access should be disabled. The same applies to running tasks, backups and the monitoring, which ensures that a running Webserver answers HTTP requests through port 80/443 on the Windows system.
We assume that an instance of XAMP is used in Windows and is not or just minimally adjusted. For example, a newer version of the Apache Friends. The Apache Webserver, the DBMS MySQL or MariaDB and the script language PHP are installed via this distribution. In the following, we only mention MySQL, even if MariaDB is used. When you made changes to the configuration, these should be kept in mind for the new system.
Finally, we assume the new home system of i-doit is already prepared, all system requirements are met and settings have been carried out. All services i-doit expects should be available on the new system: DNS, SMTP, LDAP/AD. Does everything work? Okay, let's get started.
One more thing: You should have all system accounts and passwords ready, which are used on the old as well as on the new system. These include MySQL system users (
root) and the i-doit user for MySQL (by default
Export Data from Windows
First and foremost we take care of securing the data of the old system in order to transfer them to the new system:
The Apache Webserver should be disabled so no external requests can come in. We keep the database backend MySQL running, otherwise we cannot get hold of the data.
We compress the folder in which i-doit is installed (typically found in
C:\xampp\htdocs\) to a ZIP file
We export the databases of i-doit (by default installations with a client are
idoit_data) with the software
mysqldump.exe. For this, we open the command prompt and move to the path in which the software is found (for example, at
C:\xampp\mysql\bin\). We continue by executing the following command:
Upon entering the password, all data is written in the
Now we stop the MySQL process and hope that neither MySQL nor the Apache Webserver are needed ever again in Windows. ;)
Migrate Data to GNU/Linux
After copying both the ZIP file, including the i-doit folder, and the SQL file, including the database contents, onto the new server (WinSCP serves this purpose well), we connect via SSH (for example via Putty) and operate in the command line from now on. The Apache Webserver, MySQL and PHP are fully configured and all needed packages are properly installed. The only thing missing is i-doit:
We import the database. For this we use the MySQL client:
*If the database exists for a long time this error message might appear: "Can't create table `idoit_data`.`table_name` (errno: 140 "Wrong create options")". You can find the solution HERE
After that, we connect to MySQL to set up the user needed for i-doit:
The following SQL commands set up the user
idoit, who has access to the two databases:
Then we should test this by logging in with these credentials to see if the databases can be read out correctly:
Since we are already at it, we should load the table
isys_mandatorto check the credentials:
It may be the case that absolute paths are stored in the database. Affected datasets include
system.dir.image-uploadin the table
Relative paths, like
We close the MySQL client with the
exit;command or by pressing
We extract the ZIP file in the desired location. In Debian GNU/Linux this would be in
After this, we set the permissions correctly and clear up:
If needed, we delete files which may be left over from the XAMP installation.
Now it is time for a first big test: Can the new home of i-doit be opened via the browser? If not, something went wrong in the previous steps. A precise error analysis is important for this.
What is left is the transfer of the Windows tasks to Cronjobs. Most of the time the i-doit controller (CLI) has to do recurring tasks. If you didn't set up any Tasks/Cronjobs for i-doit yet, then you should do it now.
Following this migration, you should run various tests and reactivate the interfaces between i-doit and third-party tools. It is also important to have the backups running. If all tests are successful (which can hopefully be presumed), the maintenance mode can be concluded and all colleagues be informed that the IT-documentation is available again.
How long does such a migration take? If the preparation and the subsequent work is ignored, such a migration takes not longer than two hours, so it's worth it. Good luck!