Protect your Data – Backup your CRM


Your customer data is some of the most valuable information in your organization, but many companies fail to create proper backups. Some companies mistakenly believe SaaS systems don’t need backups or create them automatically, while others fail to set up appropriate backups for on-premise systems.

Once you have added customer data to your CRM, the first thing to do is sort out your backup plan. That way, you will never lose critical business data, or the time you spent entering it.

To begin, here are a few best practices to apply to your CRM backup:

1. Multiple backup locations: 

Keep your CRM backups in multiple locations – ideally spread throughout the country or world. That way, if a natural disaster strikes one area, your backups will be safe and secure in another. With this configuration, it may take longer to create all of your backups or get your systems up and running when you need to restore a remote backup, but you’ll be thankful to have access to your data at all in that moment.

2. Test your backups:

Your backup solution looks great on the surface, but how will it perform in a disaster situation? If possible, create a regular testing schedule for your backups to confirm the backups are saved, the right data is contained within the backup and the restore functions work properly. Not only will this ensure the quality of your backup, but you also gain experience restoring backups, so it’s easy to go through the process during a high-stress situation.

3. Scheduled backups:

Do you have a tendency to create a backup when it’s on your mind and then forget to create another one for a year or so? This is a pretty common practice. However, the problem with it is when you do need a backup, you might discover the only one you have is outdated. To prevent this from happening, you can easily set your 1CRM to create automated backups. That way, you’ll always have a recent backup in case disaster strikes.

How to Backup your 1CRM Data


Not only are backups necessary for the security of your business, but you will also need one if you wish to move from Cloud to On-Premise hosting, or vice versa. You can do this at any time with 1CRM.

If you or someone working with you is IT capable, you can do it yourselves using our documentation. Instructions on how to make a local backup and restore it can be found in the tabs below, or in section 7.2.2 of the 1CRM Implementation Guide. If you’d like it done for you, we also offer a billable service.

The Backup Management tool (found in Admin – System Support Tools) is used to create a backup of your 1CRM application files and/or database, in the form of a .zip file. These backups may be saved locally on your existing server, or remotely. Remote storage options include FTP, SSH, and Dropbox.

Here are all the instructions you will need to perform local, remote, or scheduled backups and restore them within 1CRM:

Making a Local Backup

To make a local backup, follow these steps:

  • First, set the Remote Backup Type to Disabled within Backup Management – Remote Backup Options
  • Set the Local Backup Directory, by specifying an existing directory which is writable by the Apache system user, or using the default which is files/backups/ within the 1CRM installation directory. To select a new directory, just enter a new directory path. (Default value is correct for 1CRM Cloud.)
  • Set the Path to ‘mysqldump’ executable. (Default value is correct for 1CRM Cloud. For Linux and OS X, the most common values would be /usr/bin/mysqldump or /usr/local/bin/mysqldump. For Windows, the path is highly variable depending on your MySQL version.)
  • Click on Check mysqldump Path. If the path is correct, you will now see a checkmark for Database backup is available. And you will also now see a new checkbox for Database backups enabled, which you should check to have your backups include the contents of your 1CRM database (which you usually want).
  • Set the dropdown value for Application Backup Options. Options in ascending size order are: No application files (none at all), Application config, custom/ and modules/, All but cache and file attachments, Entire application directory.
  • Now click on Save to save these new settings. And then return to this screen from the Admin main screen, and click on Perform Backup to run the backup. The 5 most recent local backups (default number of local backups to keep) are listed at the bottom of the screen.

Making a Local & Remote Backup

To make a remote backup in addition to the local backup, follow these steps:

  • Set the Path to ‘mysqldump’ executable. Then click on Check mysqldump Path. If the path is correct, you will now see a checkmark for Database backup is available. And you will also now see a new checkbox for Database backups enabled, which you should check if you want your backups to include the contents of your 1CRM database (which you usually will).
  • Set the dropdown value for Application Backup Options. Options are: No application files, Application config, custom/ and modules/, All but cache and file attachments, and Entire application directory.
  • Now set Remote Backup Type to FTP, SSH or Dropbox.
  • Set Number of Backups to Keep on Remote Server (default is 5).

Remote backups can use 3 different transports: FTP, SSH, and Dropbox:

FTP – you will be prompted to enter the remote Host name, User Name, Password, and the Directory where the backups will be stored on the remote host. The backup process will not create that directory – it must already exist. Normally you should check Passive Mode.

SSH – you will be prompted to enter the remote Host name, User Name and Directory. Note that you do not specify a password. This type of backup requires some preparation on both your 1CRM server and the remote backup server – see the section below.

Dropbox – you must first authorize the 1CRM app to access the specific Dropbox you intend to use for backups. Once you select Dropbox as the Remote Backup Type, you will see an Authorize button appear, to the right of a field called Authorization Token. Clicking this button opens a popup window which prompts 1CRM backup would like access to its own folder, Apps › 1CRM backup, inside your Dropbox. You may need to login to your Dropbox account before this message can be displayed. After clicking Allow, an authorization token is displayed. Just copy the token and paste the it into the text box of the same name on the Backup Management screen, and Save the settings.

Preparing for Remote Backups Using SSH

In this section we assume that both the 1CRM server and the remote host run either Linux or some flavor of Unix (OS X works just fine). If you are using Windows servers, follow the equivalent ssh procedures for those servers. What we are going to setup here is a password-less SSH login.

1. On your remote host, you will require a user account to be used to create backups. We recommend you create a separate user account for this purpose. You will need that user’s password, and of course, SSH login ability must be enabled for that user. Here we assume that user name is remote_user, and the remote host name is

2. These steps assume that you are logged in to the 1CRM server via SSH, or using a terminal application if you have physical access to that server.

3. You will require the user name which is used to run the Apache web server on your 1CRM server. Typical names are www, _www, or nobody. Here we assume that user name is www.

4. You begin by generating a key pair which will be used to authorize the backup precess on the remote machine. The text below shows the commands to enter in bold. The text in italics will vary:

$ sudo mkdir ~www/.ssh/

$ sudo ssh-keygen -t rsa -f ~www/.ssh/id_rsa

Generating public/private rsa key pair.

Enter passphrase (empty for no passphrase):

Enter same passphrase again: Your identification has been saved in /Users/www/.ssh/id_rsa.

Your public key has been saved in /Users/www/.ssh/

The key fingerprint is: 74:50:7e:df:99:d4:d1:58:17:30:f4:65:fd:b1:23:4f root@test_host

The key’s randomart image is:

+–[  RSA  2048 ]—-+

|                      … .+.=O|

|                   o        +oB|

|                 .  o  .      o=|

|                . . .       o.E+|

|                  S         =oo|

|                               .    |

|                                    |

|                                    |

|                                    |

+   – – – – – – – – – –  +

$ sudo chown -R test ~www/.ssh


Note: You enter an empty passphrase for the key – that is very important.

5. Create an .ssh directory in the remote user’s home directory, if it does not exist yet:

$   ssh   -l remote_user ‘mkdir -p ~/.ssh’

Password: <enter remote_backup password>


6. Copy the public key to the remote host:

$ sudo cat ~www/.ssh/ | ssh -l remote_user ‘cat >


Password: <enter remote_backup password>


7. Now we have to add the remote host to the list of known SSH hosts:

$ sudo -u www -s

$ ssh -l remote_user

The authenticity of host ‘ (’ can’t be established.

RSA key fingerprint is 4e:fd:4e:74:9f:b1:87:c4:d0:da:45:3a:02:09:a2:61.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added ‘’ (RSA) to the list of known hosts.

$ exit

$ exit

Note: You are not asked for a password when running the ssh command. Setup is now complete.

Backup File Contents

Each backup zip file (name format is will by default contain:

  • An .SQL database dump file with a filename in the format 1crmdb_currentdatetime.sql
  • The entire installation directory, including the files/ directory (which can be very large, as it contains all email attachments, and 1CRM documents)
  • These contents will vary, depending on the settings of the Database backups enabled checkbox, and the Application Backup Options dropdown.

Scheduled Backups

To schedule a backup, follow these steps:

  • Check Scheduled backup enabled, and click on Save to save this new setting.
  • Ensure the scheduler is running. (See the section entitled Scheduler Setup in the Implementation Guide)
  • In Admin – System Settings – Scheduler, check that external triggering of the scheduler is working correctly. Then locate the Run Backup scheduler task in the list of tasks, and make sure it is Enabled, with a Run Interval of perhaps a Day or a Week.

Note: While the system will automatically limit the number of backup files retained to the maximum you have specified, running daily backups can become very expensive in terms of remote data transfer costs, and server loading. Use scheduled backups with great care, and with these costs in mind.

Restoring a Backup
Before restoring a backup, you will need to have the following items available to you:

1. The backup archive (file name is in the form file)

2. Know the full path to your mysql executable file. On Linux and OS X, the most common locations are /usr/bin/mysql and /usr/local/bin/mysql. (Note: This is not required if the backup archive does not contain a database dump.) Plus the mysql user name, mysql password, and mysql database name that you intend to use for your 1CRM install.

3. Access to the server where 1CRM is installed. (If you do not have 1CRM installed, but want to restore a backup of one server onto a different server, just prepare an install directory by unzipping the 1CRM Full install file and then setting the folder and file permissions as per the normal install process.)

You begin the restore process by simply running the restore.php file in your 1CRM installation directory. For example, if you normally run 1CRM by sending your browser to, then in this case, enter the URL

Right at the start of the restore process, you will be asked to create a special file restore_key.txt to prove that you have full access to the server. The screen will show you a key value which you paste into a new text file and then save as restore_key.txt in the root of your 1CRM installation folder. Then click on the link try again, to confirm you have access. You can also use the Start over link at any time to re-start the entire restore process.

Next you will be prompted to select and upload the backup archive. If the backup file contains your database information (in addition to any installation directory files) then you will also be asked for key MySQL information: Full path to mysql executable, mysql user name, mysql password, mysql database name. Now click on Submit, and if the MySQL values all work properly, your backup will now be restored, and the backup process will proceed to completion.

You’re all done!

No one wants to deal with CRM data loss, but having a solid backup plan makes it a bump in the road instead of a major disaster. Don’t wait until it’s too late! Using these CRM backup best practices, backup your CRM today!

Need help backing up your 1CRM system? Contact us today to learn about our paid backup services.

Leave a Reply


Your browser is out of date. It has security vulnerabilities and may not display all features on this site and other sites.

Please update your browser using one of modern browsers (Google Chrome, Opera, Firefox, IE 10).