This article focuses on the general procedure to migrate an i-doit installation from one GNU/Linux to another one. The migration includes databases as well as files and directories.
Preparation and Assumptions
You have to observe a few things to guarantee a smooth migration:
- i-doit and optional add-ons should be up to date.
- No changes should be made to the old system, so that we are able to return quickly to the original status when trouble strikes.
- The commands shown here apply to a current Debian GNU/Linux and should be modified in correspondence with the environment. Avoid a blind approach regarding the execution of commands.
Preparation of the New System
First of all, it is necessary to prepare the new systems as far as possible by observing the following:
- The new operating system meets the system requirements and is up to date.
- The system settings have been configured on the new operating system.
- The usual security measures have been carried out.
Closing Down the Old System
The old system should not be used productively during the migration process anymore:
- Of course, down times are annoying, especially when users do not expect it. Therefore you should inform i-doit users about the upcoming migration of the installation and about the approximate length of downtime.
After the above mentioned points have been completed, you should stop the Apache Webserver:
Migration of Files and Directories
We copy the complete i-doit installation directory from the old system to the new system. In many cases, the directory is located under
/var/www/html/. Here is an example with SSH, where i-doit can be found in the directory
After the copying process you should ensure that the file system permissions are set correctly. The Apache webserver requires read and write permissions for the complete installation directory. In the "Setup" article you can find additional tips. Example:
i-doit stores internal caches under the
temp/directory. The contents should be removed completely. The caches are created automatically with the first use of i-doit:
You should check if the
.htaccessfile was copied:
Migration of Databases
i-doit requires at least two databases. You should create a dump of each database on the old system:
*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
We copy these dumps to the new system:
Then the dumps are imported to the new system:
A MySQL user was created during the initial i-doit setup (location:
idoit). This user has to be available on the new system with identical permissions and identical password. For this purpose, we log in with the superuser of MySQL:
Now we execute the required SQL commands:
We log in with this user for a test:
In this context, we can also check the credentials of the tenant databases:
The above password for the
idoituser should be identical with the details in the file
- Afterwards, you should adapt DNS entries, IP addresses, host names etc., so that i-doit can be accessed as usual.
- Now interfaces to third-party systems can be reactivated. The functions should be checked.
- Reactivate cronjobs and test them.
- When the Web GUI reacts as usual and all data are available in i-doit, the migration was successful.