Let the platform do the work

Providing a Backup Without Sensitive Data

Overview

You may, on occasion, be required to provide a backup of your on-site instance to SugarCRM Support in order for our team to troubleshoot possible issues. System administrators for on-site instances are responsible for creating these backups as doing so is not supported by SugarCRM. This article will provide instructions on how to create a backup of your on-site instance without including any potentially sensitive data using MySQL commands as an example.

Prerequisites

You must have full administrator access to the database server and the web server that contains the files.

Steps to Complete

There are two main steps required for backing up your on-site environment without including any sensitive data. The first step is to execute the database backup, and then you must execute the filesystem backup. 

Executing the Database Backup

In order to include all necessary custom modules and/or relationships, you are required to supply a full backup of the structure of your database. For MySQL, this backup can be made by using the mysqldump command with the following parameters to ensure no data is included:

mysqldump -h DB_HOST -u DB_USERNAME -p -d DB_NAME | gzip > YYYYMMDD_DB_NAME.sql.gz

The resulting file YYYYMMDD_DB_NAME.sql.gz will be a compressed (GZip) dump of your database structure of the database specified in DB_NAME.
Note: -d is a short version for --no-data in the mysqldump command.

You must also provide the following tables and their content. These tables contain data that is only used by the application, and we must have their data included in the backup in order to recreate a similar copy of your instance for debugging purposes.

  • acl_actions
  • acl_fields
  • acl_roles
  • acl_roles_actions
  • acl_role_sets
  • acl_role_sets_acl_roles
  • acl_roles_users
  • config
  • currencies
  • custom_fields
  • eapm
  • expressions
  • fields_meta_data
  • relationships
  • roles
  • roles_modules
  • roles_users
  • team_memberships
  • team_notices
  • team_sets
  • team_sets_modules
  • team_sets_teams
  • teams
  • upgrade_history
  • user_preferences
  • users 

The following MySQL command may be used to extract these tables including their data:

mysqldump -h DB_HOST -u DB_USERNAME -p DB_NAME acl_actions acl_fields acl_roles acl_roles_actions acl_roles_users config currencies custom_fields eapm expressions fields_meta_data relationships roles roles_modules roles_users team_memberships team_notices team_sets team_sets_modules team_sets_teams teams upgrade_history user_preferences users | gzip > YYYYMMDD_DB_NAME_tablesWithData.sql.gz

Executing the Filesystem Backup

After you have executed the database backup, you will then need to execute the filesystem backup. All the files in the Sugar filesystem must be supplied to the SugarCRM Support team in order for the system to be accurately installed and debugged. However, to exclude any potentially sensitive data, please remove from the ./upload/ directory any files whose name starts with a record ID which are similar in structure to "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee". The ./upload/upgrade/ directory must be included in the backup as it is needed for any customizations uploaded to your instance, but other files in ./upload/ should be removed.

Application

Once completed, you will have a backup of your on-site environment clear of any sensitive data. You can safely provide this backup to SugarCRM Support for proper debugging. It is recommended that you supply the files via a compressed archive. When requesting a backup for troubleshooting, SugarCRM Support will provide you with access to an FTP for transferring the backup files.