Backup and restore
Warning
Always take a full backup before updating. See Updating.
What has to be backed up
OpenCelium keeps state in three places, and a usable backup needs all of them:
Where |
What |
|---|---|
MariaDB |
Users, groups, connectors, schedules, categories, license tracking. |
MongoDB |
The workflow documents — the integrations themselves. |
Filesystem |
|
Restoring only the SQL database leaves you with connectors and schedules pointing at workflows that no longer exist.
Note
opencelium.config.backup keeps automatic copies of application.yml
whenever it is written through the UI — see opencelium.config. Those are
convenience snapshots, not a backup strategy.
Procedure
To create a local backup of your OpenCelium installation, please execute the following command as root. Old backups will be removed after 14 days.
Note
Please change the password (secret1234) in the following command line!
oc backup -d /var/backups/opencelium -u opencelium -p secret1234
Restore
We decided not to provide an automatic functionallity for the restore process, because it’s mostly not needed to restore everything at once.
Extract the backup:
mkdir /var/backups/opencelium/restore
ls -l /var/backups/opencelium
Note
Please change the <backup filename> in the following command line!
tar xf /var/backups/opencelium/<backup filename>.tar.gz -C /var/backups/opencelium/restore/ --strip-components=4
Restore MySQL database: (Connectors, Workflows and Schedules)
Note
Please change the password (secret1234) in the following command line!
mysql -uopencelium -psecret1234 opencelium < /var/backups/opencelium/restore/oc_data.sql
Restore MongoDB database (workflow documents)
mongorestore --drop --db opencelium /var/backups/opencelium/restore/opencelium/
Restore files and folders: (all programm files, invokers and templates)
In case you have to replace single files and folders, you will find all backuped files within the extracted backup in /var/backups/opencelium/restore/opt-backup .