Migration guide from Debian 9 to Debian 11

Over the past years we have developed a very good stability of EasyDCIM platform and Remote Agents functionality based on the Debian 9 operating system. High performance together with maximum security are the key factors why this operating system has been selected.

Support for Debian 9 is planned to end on June 30, 2022. The last versions of EasyDCIM and Remote Agent supported by Debian 9 are:

  • EasyDCIM v1.8.3
  • Remote Agent v1.7.5

All subsequent versions of EasyDCIM and Remote Agents will only be supported by the Debian 11 operating system. Below are the migration guidelines from Debian 9 to Debian 11 depending on the preferred migration method.

Making a backup copy

Before proceeding with the EasyDCIM migration process, you need to make a backup copy. To do this, log into the EasyDCIM server using SSH and run the command:

sudo wget https://www.easydcim.com/download/scripts/easydcim_backup.sh -O /opt/easydcim_backup.sh && sudo bash /opt/easydcim_backup.sh

The backup files will be made automatically and saved in the /opt/backups/ directory. There will be two backup files: database and files. If a local agent is detected then the script will also back up the Remote Agent’s database.

Preferred EasyDCIM migration methods

There are several preferred ways to migrate EasyDCIM to another server.

The preferred and safest way to migrate EasyDCIM is to prepare a separate server with the Debian 11 operating system. The operating system should not contain any additional built-in libraries such as a database server or a web server. The system dependencies and libraries needed to run EasyDCIM are automatically installed during the installation process with our installer.

1.1. EasyDCIM installation

When we have a ready server with Debian 11 we need to do a fresh installation of EasyDCIM. Before starting the installation, you need to log into your Client Area - EasyDCIM account and then perform the Reissue action on your license. After performing this action we will be able to perform the installation of EasyDCIM on a new server using the appropriate license key.

Download the installer using the command:

apt-get install sudo && sudo wget https://www.easydcim.com/download/installer/debian11/installer.sh -O /opt/installer.sh
sudo bash /opt/installer.sh --key 'KEY'

Remember to add the --key parameter at the end of the command and paste your license key there. You can find it in the customer area in the Licenses section, under product details. After several minutes the installation should be finished. Now restore the backup that was made on the old server.

1.2. Migrate backup files to a new server

We can transfer the backed up files to the new server using the rsync command. The command should be executed on the new server running Debian 11.

apt-get install rsync
sudo rsync -azP root@OLD_SERVER_IP:/opt/backups/ /opt/backups

In place of OLD_SERVER_IP, specify the IP address of the old server running Debian 9. Of course, both servers must be enabled and visible on the network.

1.3. Importing the EasyDCIM database

To restore the database, run the command:

php /opt/easydcim/console database:import /opt/backups/EASYDCIM_BACKUP_FILE.sql

In place of /opt/backups/EASYDCIM_BACKUP_FILE.sql, specify the path to the file containing the copy of the database made on the old server. When importing the database, we will need to confirm that the current database will be deleted and replaced with the database from the SQL file.

1.4. Importing EasyDCIM files

The best way to migrate EasyDCIM files is to use the rsync command. The command should be executed on a new server running Debian 11 operating system.

sudo rsync -azP --exclude=/app/config/database.php --exclude=/storage/keys/* root@OLD_SERVER_IP:/opt/easydcim/ /opt/easydcim
sudo bash /opt/easydcim/scripts/storage_permissions.sh

In place of OLD_SERVER_IP, specify the IP address of the old server running the Debian 9 operating system.

1.5. Importing the Remote Agent database

To restore the database, run the command:

php /opt/easydcim_remote/artisan database:import /opt/backups/REMOTE_AGENT_BACKUP_FILE.sql

In place of /opt/backups/REMOTE_AGENT_BACKUP_FILE.sql, specify the path to the file containing the copy of the database made on the old server. When importing the database, we will need to confirm that the current database will be deleted and replaced with the database from the SQL file.

1.6. Importing Remote Agent files

The best way to migrate Remote Agent files is to use the rsync command. The command should be executed on a new server running Debian 11 operating system.

rsync -azP --exclude=/config/database.php --exclude=/system/keys/* root@OLD_SERVER_IP:/opt/easydcim_remote/ /opt/easydcim_remote
sudo bash /opt/easydcim_remote/system/scripts/storage_permissions.sh

In place of OLD_SERVER_IP you need to specify the IP address of the old server running Debian 9. This operation can take a relatively long time because Remote Agents store the installation files of the operating systems as well as the ISO files used to generate the Windows templates.

1.7. Restoring the SSL certificate

Reinstall the SSL certificate following the guidelines: SSL Configuration - EasyDCIM Documentation

1.8. Finalizing the configuration

The last step is to specify the IP address of the new server. In most cases you will need to set the new server to the IP address that was previously used for the old EasyDCIM server. For example, if the old EasyDCIM server used the IP address 192.168.56.100, you should set this address on the new server. This way no additional settings will be required and EasyDCIM will be ready to use.

If the new server has a different IP address then run the command:

php /opt/easydcim/console settings:change "common.url.default" "http://NEW_IP_ADDRESS"

Perform these steps only if you do not use a domain and the new EasyDCIM server has a different IP address than the previous server you used.

Once the migration is done, update EasyDCIM to the latest version according to the guidelines:

apt-get install sudo && sudo wget https://www.easydcim.com/download/updater/debian11/updater.sh -O /opt/updater.sh
sudo bash /opt/updater.sh --key 'KEY'

That’s all, EasyDCIM should be ready to use.

2. Upgrade of current server with Debian 9

The latest version of EasyDCIM may work on the current server where EasyDCIM control panel is installed. In this case, you need to upgrade your Debian system from version 9 to version 11. Please note that this is a complicated process and the time of unavailability of EasyDCIM in such a case may last up to several hours. If you are interested in upgrading your current EasyDCIM server, this process can be done by our team free of charge. In order to do so, please contact us and provide your SSH access data to the EasyDCIM server, please also specify the hours when the server upgrade should be performed. Our team can perform the upgrade between 9 am and 3 pm GMT+2.

Preferred Remote Agent migration methods

Remote Agents do not contain critical data on their servers. In most cases these are just the installation files used to install the operating systems and the ISO files for the Windows family of systems. To update the Debian operating system on the Remote Agent server you need to do the following:

  1. Download the script using the command:

    apt-get install sudo && sudo wget https://www.easydcim.com/download/updater/migrate_debian10.sh -O /opt/migrate_debian10.sh

  2. Run the migrate command:

    sudo bash /opt/migrate_debian10.sh

  3. Reboot the Linux system so that you can boot into Debian 10 Buster

The above commands will upgrade from Debian 9 to Debian 10. Then upgrade from Debian 10 to Debian 11:

  1. Download the script using the command:

    apt-get install sudo && sudo wget https://www.easydcim.com/download/updater/migrate_debian11.sh -O /opt/migrate_debian11.sh

  2. Run the migrate command:

    sudo bash /opt/migrate_debian11.sh

  3. Reboot the Linux system so that you can boot into Debian 11 “bullseye”

After completing the above steps, update the Remote Agent files:

apt-get install sudo && sudo wget https://www.easydcim.com/download/updater/debian11/remote_updater.sh -O /opt/remote_updater.sh
sudo bash /opt/remote_updater.sh

Of course, the whole above process can be done completely free of charge by our team. Please contact us and provide your SSH credentials of the Remote Agent server and specify the time when the server upgrade should be done. Our team can perform the upgrade between 9 am and 3 pm GMT+2.