This guide explains how to backup UCRM manually or how to migrate UCRM to another machine.
UCRM data is stored in two locations:
- /home/ucrm/data - images, pdf invoices, encryption key
- /home/ucrm/data/postgres - postgres database - all other UCRM entities such as clients, payments, etc.
Table of Contents
What Needs to be Migrated
If you want to migrate the UCRM app to another machine, you should ensure the database and other data are migrated. A database backup can be created and downloaded in System > Tools > Database Backup while other data, such as invoice pdf files, SSL and encryption keys can be found in the UCRM data directory /home/ucrm/data.
Creating a backup, or migrating a database can also be processed in the UCRM app, which might be easier for some users. See System > Tools > Database backup. Using this tool you can backup and restore the database instead of moving the /home/ucrm/postgres folder.
How to Backup UCRM Data Folders
For data backup, you must first pause the running containers. Go to directory, where your docker-compose.yml is located (it will probably be in /home/ucrm). Then archive the data and save it somewhere safe and finally "un-pause" the containers.
Go to your UCRM home directory
Pause running containers
Pack the data directory
sudo tar -cvjSf ucrm-data.tar.bz2 data
Un-pause running containers
This set of commands will create separate archives for UCRM data (e.g. invoice PDFs) and database. Then you can move them to another machine or archive.