Migration guide from old to new server

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 bash /opt/easydcim/scripts/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.

The preferred and safest way to migrate EasyDCIM is to prepare a separate server with the Debian 12 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 New Server 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 -y sudo curl && sudo curl -o /opt/installer.sh https://www.easydcim.com/download/live/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.

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. 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/artisan 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 12 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.

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 12 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. 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/artisan 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 -y sudo curl && sudo curl -o /opt/updater.sh https://www.easydcim.com/download/live/updater.sh
sudo bash /opt/updater.sh --key 'KEY'

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