(ARCHIVED) UCRM v2 - Backup and Migration

This article has been archived.

This article is applicable to UCRM v2 and will not be updated further. Thenew version of CRM is now part of the UNMS platform, and help articles for that version can be found under the UNMS section. See this article on how to upgrade from UCRM to UNMS.


This guide explains how to set up automatic and manual backups and how to migrate UCRM to another machine.

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

Backups 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

The manual backup of the the UCRM app and all of its files is recommended only for advanced users. 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 the complete 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

Intro to Networking - How to Establish a Connection Using SSH

Was this article helpful?
0 out of 0 found this helpful
Can't find what you're looking for?
Visit our worldwide community of Ubiquiti experts for more answers
Visit the Ubiquiti Community