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
- Automatic Backup
- Manual Backup
- Data Directory Storage
- How to Restore Using Backup Archive
- Related Articles
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.
Note that invoice PDF files are never included in backup archives, as they are easily regenerated on demand.
You can use this backup for restoring an older state of UCRM on the current server, or for migrating UCRM to another server.
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.
sudo tar -cvjSf ucrm-data.tar.bz2 data
Data Directory Storage
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 the UCRM Backup Archive
You can upload the archives back in System → Tools → Backup to the existing or new UCRM application and run the restore process.
|Note: 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.|