0% found this document useful (0 votes)
170 views

Backup & Restore

The document provides steps to restore a SugarCRM MySQL database using either the command line method or phpMyAdmin method. For the command line method, it involves shutting down the web server, dropping and recreating the SugarCRM database, and then using MySQL to import the backup file. For the phpMyAdmin method, it involves dropping the existing SugarCRM database, creating an empty one, and then using the import feature to restore from the backup file. Both methods conclude by verifying the restoration by checking the database and SugarCRM system.

Uploaded by

api-26072707
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
170 views

Backup & Restore

The document provides steps to restore a SugarCRM MySQL database using either the command line method or phpMyAdmin method. For the command line method, it involves shutting down the web server, dropping and recreating the SugarCRM database, and then using MySQL to import the backup file. For the phpMyAdmin method, it involves dropping the existing SugarCRM database, creating an empty one, and then using the import feature to restore from the backup file. Both methods conclude by verifying the restoration by checking the database and SugarCRM system.

Uploaded by

api-26072707
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 6

How do I restore my SugarCRM MySQL

database?
From SugarCRM Wiki

Command Line Method

Step 1: Access your web server from an SSH connection.

Step 2: Verify your backupfilename.sql file is readonly. This will help protect your
backup in case of error.

Step 3: Prepare for restoration by shutting down your webserver, then start up mysql
client.

%mysql -u USERNAME -p

Enter password at the prompt.

mysql> show databases;

Be sure to note the name of your SugarCRM database

mysql> drop database SUGARDATABASE;


mysql> create database SUGARDATABASE;

This is the same SugarCRM database name noted from above.

mysql> quit

You're returned to the shell prompt.

Step 4: Actual Restoration

%mysql -u USERNAME -p < backupfilename.sql

Enter password at the prompt.

NOTE: Pay close attention to your redirection! If you accidently use >, and your
backupfilename.sql file is set for R/W, you'll loose your backup in a flash. (One reason
why the backupfilename.sql is flagged R/O for all users.)

mysql -u USERNAME -p
Enter password at the prompt.

mysql> show databases;

You should see your SugarCRM database

mysql> use SUGARDATABASE;

Database changed.

mysql> show tables;

Output should show all the SugarCRM tables.

After this point, your SugarCRM database has been restored. Restart your webserver, and
login to your SugarCRM system. Verify that your data is back.

phpMyAdmin Method

Step 1: Login to your PHPMyAdmin admin.

Step 2: Select the SugarCRM database from the pull down list on the left.

Step 3: Write down the name of your SugarCRM database. Drop the database by
selecting your SugarCRM database, clicking on the RED Drop tab.
Click "Ok"

Step 4: Create empty SugarCRM database.


Step 5: Restore your SugarCRM data using the Import tab. Browse to your
backupfilename.sql file, click open, then click the "Go" button.
Note: This step could take some time to complete. It'll depend upon the size of your
SugarCRM database.

Step 6: Verify your SugarCRM database has been restored.


After this point, your SugarCRM database has been restored. Restart your webserver, and
login to your SugarCRM system. Verify that your data is back.

You might also like