Procedure for migrating suitecrm to another server

Procedure for migrating suitecrm to another server.

I have problems with my suitecrm 8.2.4 installation, probably due to the presence on the system of multiple php version, and customizations, and perhaps also some file/modifications/corruption: therefore it is impossible to migrate by copying all the suitecrm directory onto another server, or problems will persist.
So I decided to create a new fresh virtual machine, keeping all suitecrm data. Since it took me a long time to manage it, I would like to share my experience.

Server A with actual SuiteCRM installation
Server B new Server

Steps for making it work:
Server A:

  • export suitecrm DB_A
  • create a tar (TAR_A) of the following directory:
    public/legacy/custom
    public/legacy/upload
    public/legacy/modules/… (Only the customised modules)

Server B:

  • created a VM on virtualbox with Ubuntu 22.04 server only (2Gbytes RAM). Remember to set the proper hostname and time/date zone.
  • Install php7.4 and all required modules (with php8.0 I had several problems)
  • Set error_reporting as written in the guide, and in both apache2/php.ini and cli/php.ini the following settings:
    memory_limit = 512M
    max_execution_time = 300
    post_max_size = 64M
    upload_max_filesize = 64M
  • Install mysql8.0 instead of mariadb (like for php, I had problems with mariadb)
  • Install apache2 and enable ssl module
  • Download the SUITECRM installer of the same version of Server A and unzip it in the proper location
  • Setup correct Permission (as described in SuiteCRM guide)
  • Create database DB_B, suitecrm database user, give the correct permission to him to operate on the DB_B
  • Install SuiteCRM using the CLI (installation via web gives errors without showing them…)
  • Set permission again
  • import database DB_A into DB_B
  • import TAR_A into the server, extract and set permission on that. Rsync the 3 folder within the proper location.
  • Enter into suitecrm as admin → quick repair and rebuild (Don’t double click, wait the necessary time…)

That’s all!

During the process, I created some snapshots in the VM to avoid restarting everytime from the scratch…

1 Like