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…

2 Likes

Hey @cicciobello Hope you are doing well.
This is a little bit late but did you encounter issues with modificaitons you did to default modules?

For example i added 7 new fields in the Contacts Module.
Using your method will they pass along?

Wish you a Good Day and hope you are able to answer xD

I am very sorry, but I cannot answer. I switched to another system, and I am not able to answer to your question any more…
Sorry for that.

No Worries, have a great day :smiley:

Basically you just need to copy over all the files to the new server. Copy the database over. Then reset the permissions and ownership.

Edit the config.php file for URL if it changed. Also edit the DB access critera to match the new server.

All should work as it did on the previous server.

I haven’t moved a version 8 yet, you may need to clear the cache as well after you move it.

All your custom fields and modules will work just as they did on the original installation. In some cases you may need to do repair and rebuild (you might want to do that anyway).

1 Like

Hey , I did the method you described, copied everything over but was for half a day trying to figure out why DB connection was giving refused when on the config.php has the correct password and username but on /legacy was working fine.

Turns out that Symphony uses .env.local to establish the connection to mysql and /legacy uses the config.php to establish a connection. Might be something to put on the Documentation regarding Migrations.

WIsh you all a great day and many thanks for the tips :slight_smile:

1 Like

oh god :exploding_head: that’s true!

You can suggest these changes for the docs:

1 Like

Ah yes! I had that issue once. I forgot about that. Yes, the db crendentials for Version 8 are in the .env file.

1 Like

Thanks i will suggest that :smiley: