Migrating From On-Site to SugarCloud
Overview
This article will go through the process of migrating an on-site deployment to the SugarCloud environment.
Prerequisites
A few requirements must be met before an instance can be migrated to the SugarCloud environment:
- The on-site deployment must be running MySQL. If you are using SQL Server or Oracle, you will need to speak with your Sugar Customer Advocate about data migration options.
- The instance must be updated to a supported version of Sugar. Refer to the Managing Your Sugar Subscription article for information on determining your Sugar version. Once identified, you can check your version against our Supported Versions.
Migration
Once the above requirements have been met you are ready to migrate.
Case Portal
Inform Sugar Support of your intention to migrate by opening a support case. They will provide you with an FTP site and a set of credentials so you can transfer your instance. Sugar Support will expect you to provide two files. One file will be an archive (zip, tar, etc.) containing all the files and folders of your Sugar instance. The second file will be an export of your SQL database; it is a good idea to archive the resulting SQL export as well.
Files and Folders
You should be aware of the location of your Sugar instance on your on-site server. If you do not, you can locate the path to your instance by navigating to Admin > Schedulers.
Once there, you should see something similar to this:
To Set Up Crontab
Note: In order to run Sugar Schedulers, add the following line to the crontab file:
* * * * * cd <path to sugar instance>; php -f cron.php > /dev/null 2>&1
Now that you have located the path to your Sugar instance, archive the entire contents of the Sugar root directory using the archive utility of your choice (zip, tar, WinZip, WinRar, 7zip, etc.). The Sugar root directory is the directory that contains the files config.php, cron.php, sugarcrm.log, and the folders custom
, cache
, and modules
among others.
Database
The following describes how to export a MySQL database using the command line utility "mysqldump". If you prefer, you may choose to use a tool such as phpMyAdmin to export your database. The command to export a MySQL database is:
mysqldump -h localhost -u [MySQL user, e.g. root] -p[database password] [name of the database] > backup.sql
If you do not know the host, username, password, or database name you may refer to the "config.php" file of your Sugar instance. The "dbconfig" array in the "config.php" file contains all the required information. The example above showed the following "dbconfig" array:
'dbconfig' => array (
'db_host_name' => 'localhost',
'db_host_instance' => 'SQLEXPRESS',
'db_user_name' => 'sugarcrm',
'db_password' => 'MyP@ssword',
'db_name' => 'sugarcrm',
'db_type' => 'mysql',
),
Using this information we can rewrite the command:
mysqldump -h localhost -u sugarcrm -pMyP@ssword sugarcrm > backup.sql
Upload
Finally, upload the two files to the FTP site provided by the Sugar Support team. The instance will be deployed to the SugarCloud environment and a URL to the instance will be provided to you.