So far we’ve looked at installing SugarCRM and walking through the initial setup with the login wizard. Now, we’ll go through the process of creating a backup of the SugarCRM system. The process applied here translates to upgrading any SugarCRM version or edition. The time it takes to backup a SugarCRM system largely depends on the size of the system. If your SugarCRM instance is relatively new, the backup process should take less than an hour, start to finish. For systems that have been around for a few years, and get a lot of usage, the backup may take three or four hours, or maybe more. Be sure to schedule enough time to complete your upgrade, and make sure that all the users of the system are aware that a backup is going to happen, and when.
There are two components to any SugarCRM installation that we need to backup: the application and the database. Before you begin taking a backup, you should make sure that no one is using the system. This is for two reasons:
- The system performance may slow down
- To avoid mismatches between the application and the database.
1. Finding the Database Name
First, you need to find out the name of the database that SugarCRM is using. You only need to do this once (as long as you remember or write down the name of the database – it will never change). If you already know the name of the SugarCRM database, you can skip to section 1.2. Backing-up The Database.
To find out the name of the database log in to your SugarCRM system using your administrator details.
Then, click on ‘Admin’ at the top of the screen.
Scroll down to the ‘System’ section then click on the ‘Diagnostic Tool’ option.
Unselect all options except for the “SugarCRM config.php” one – the config.php file has all sorts of information about how the SugarCRM system works. Then, click on the ‘Execute Diagnostic’ button. This will do the diagnostic and ask you to download the Diagnostic File.
Click the link to download the Diagnostic File.
The Diagnostic File is a ZIP file. Once downloaded to your computer, open it and you will see one file inside, the config.php file. You need to open this file.
In windows, right-click and select ‘Open with > WordPad’.
Once you have the config.php file open, look for the section that starts with “dbconfig”. This is the part that tells SugarCRM where the database is and how to connect to it. The ‘db_name’ bit is saying that the name of the database that SugarCRM is using is, in this case, sugarcrm_database. This will be different for you. Write this down in a safe place.
You can now close the config.php file.
2. Backing-up The Database
Now that you know the name of the database, you can track it down and make a backup of it.
If you’ve installed your SugarCRM through HostMonster, or you have access to cPanel (the system that lets you control your web hosting) on your hosting provider, the following guide applies. Otherwise, if you have set up SugarCRM on an internal server, using Windows or Linux, please ask your database administrator to backup the SugarCRM database to a file that can be restored.
To start with, log in to your cPanel.
Then enter your username and password for your hosting account.
Once you’re logged in, scroll down to the Databases section and click on “phpMyAdmin”
It gets a little bit techie here, but stay with it.
Once phpMyAdmin has loaded, you will see a list on the left. This is a list of all the databases in your hosting account. If you’re using HostMonster, your account username is the first part of the database name and, won’t be shown in this list. For example, if the name of your SugarCRM database is ‘cloudpr_sugarcrm’, then you’ll see ‘_sugarcrm’ in this list. Based on this, find and click on the name of your SugarCRM database. Then, in the options across the top, click on ‘Export’
On the export screen, all the right options are selected by default, so simply click ‘Go’.
This will start to download a backup of the SugarCRM database. Be warned – if you’ve used SugarCRM for a while, the backup can be pretty big, so be patient while the backup downloads.
Once the backup has finished downloading, store the file somewhere safe and in a way that you know the date you did the backup. For example, change the filename to ‘SugarCRM_DB_Backup_YYYYMMDD’.sql.
You can now log out of phpMyAdmin and cPanel.
3. Backing-up the SugarCRM Application
Go back into your SugarCRM system and click on Admin at the top. Then, scroll down to the System section and click on the ‘Backups’ option.
The Backups area allows you to create a backup of all the SugarCRM application files (not including the database). After the backup is created, you can download it to your computer for archiving.
Enter ‘cache/backups’ in the Directory field and today’s date in the form YYYYMMDD, followed by .zip in the Filename field. For example, 20110928.zip
Click the ‘Confirm Settings’ button to make sure the details you’ve entered are correct. Once the settings have been confirmed, the button will change to ‘Run Backup’. Click ‘Run Backup’. This may take some time depending on the size of your SugarCRM application.
Once the backup process has finished, you will see a message saying that the backup has been successfully stored. Now, we need to download that backup so we can archive it somewhere.
Open your SugarCRM system in a new window or tab. Then, in the URL/Address bar at the top of the browser, replace everything after the last slash with the details you entered when creating the backup. For example, if your SugarCRM system is located at http://www.mybusinesscrm.com/, then enter this in the URL/Address bar: http://www.mybusinesscrm.com/cache/backups/20110928.zip, then hit Go. You will be prompted to download a ZIP file. This is the backup you made of the SugarCRM application files. Download the backup and store it somewhere safe – in the same place you have stored the database backup would be best.
Your SugarCRM system has now been backed up! Next, we will look into upgrading SugarCRM to the latest version.