UCRM - Backup and Migration


This guide explains how to backup UCRM manually or how to migrate UCRM to another machine. This guide is valid for UCRM version 2.4.0 and higher.

Table of Contents

  1. Automatic Backup
  2. Manual Backup
  3. Data Directory Storage
  4. How to Restore Using Backup Archive
  5. How to Restore From a Manual Backup
  6. Related Articles

Automatic Backup

Back to Top

Backup can be created and downloaded in System → Tools → Backup. You can configure which data is to be included in backup archives (client documents, invoice templates, etc.). An automatic backup is created once every 12 hours and takes this configuration into account. You can use this backup for restoring an older state of UCRM on the current server, or for migrating UCRM to another server.

NOTE: Note that invoice PDF files are never included in backup archives, as they are easily regenerated on demand.

Manual Backup

Back to Top

All UCRM data is stored in the /home/ucrm/data directory. For manual backup, you should copy this directory to a safe external storage. If you decide to create this backup of whole data directory, make sure your UCRM is not currently in use.

cd /home/ucrm
docker-compose pause
sudo tar -cvjSf ucrm-data.tar.bz2 data docker-compose.env
docker-compose unpause

Data Directory Storage

Back to Top

This is what is saved in each of the data directories below:

  • /home/ucrm/data/ucrm - images, PDF invoices, encryption key, client documents, etc.
  • /home/ucrm/data/postgres - PostgreSQL database - all other UCRM entities such as clients, payments, etc.
  • /home/ucrm/data/rabbitmq - RabbitMQ data - draft approval queues, report generation queues, etc.
  • /home/ucrm/data/elasticsearch - Elasticsearch index - unnecessary for backup, as it's always recreated on boot.

How to Restore Using Backup Archive

Back to Top

You can upload the archives back in System → Tools → Backup to the existing or new UCRM application and run the restore process.

ATTENTION: Current database will be dropped and all conflicting files will be overwritten by the ones in archive (for example, the organization logo image). Existing UCRM files, which are not included in the backup archive, will NOT be deleted during the restoring process.

How to Restore From a Manual Backup

Back to Top

ADVANCED CONFIGURATION: The preferred method of restoring a UCRM database is to use the UCRM Backup Archive in the GUI as mentioned above. This method is for advanced users only.

These steps will require a new UCRM installation and will guide you in manually restoring the backup files when using the Manual Backup instructions in this article.

1. Install UCRM on a clean instance
2. After a successful, new install: Stop UCRM using

cd /home/ucrm && sudo docker-compose stop

3. Delete the "data" folder (in clean installation)

rm -r /home/ucrm/data/

4. Delete the "docker-compose.env" file (in clean installation)

rm  /home/ucrm/docker-compose.env

User Tip: Only delete these files in the new, clean UCRM instance. Do not delete these from an old UCRM instance with useful data!

5. Move the backup archive file to /home/ucrm

6. Extract the backup file in the /home/ucrm directory

tar xvjf ucrm-data.tar.bz2tar xvjf ucrm-data.tar.bz2 

7. Edit File Permissions

cd /home/ucrm
sudo chown ucrm:ucrm docker-compose.env
sudo chmod 644 docker-compose.env
sudo chown -R ucrm:ucrm data
sudo chmod -R 777 data -d

8. Start UCRM again

cd /home/ucrm && sudo docker-compose up -d

Related Articles

UCRM - How to Migrate from airCRM to UCRM

Intro to Networking - How to Establish a Connection Using SSH

We're sorry to hear that!