Backup and restore
Self-hosted On your own installation, backups are your responsibility. Cloud In the cloud, becon operates the infrastructure and its backups; to keep your own copy of the data, export it — see Export data.
What to back up
What |
Where |
|---|---|
The MongoDB database |
Everything DataGerry knows: types, objects, history, users, groups, rights, settings, reports,
webhooks, ISMS data — and the files in the file explorer and attachments, which are stored in
the database too. The database name is |
The configuration |
|
The database is the part that matters; the configuration is small and rarely changes.
Back up
Use mongodump, which ships with the MongoDB database tools. It can run while DataGerry is
running.
Packages:
# mongodump --db cmdb --gzip --archive=/var/backups/datagerry-$(date +%F).gz
# cp -a /etc/datagerry /var/backups/datagerry-conf-$(date +%F)
Docker:
# docker exec dg-mongodb mongodump --db cmdb --gzip --archive > /var/backups/datagerry-$(date +%F).gz
# cp -a /opt/DataGerry-docker/conf /var/backups/datagerry-conf-$(date +%F)
Add --uri with credentials if your MongoDB requires authentication. Run the backup daily, for
example from a systemd timer or cron, keep several generations, and copy them off the host.
Restore
Stop DataGerry, so nothing writes to the database during the restore:
# systemctl stop datagerry # or: docker compose stop dg-backend
Restore the archive.
--dropreplaces the existing collections with the ones from the backup:# mongorestore --drop --gzip --archive=/var/backups/datagerry-2026-10-01.gz
Docker:
# docker exec -i dg-mongodb mongorestore --drop --gzip --archive < /var/backups/datagerry-2026-10-01.gz
Put the configuration files back if needed, and start DataGerry again.
Restore with the same DataGerry version that made the backup, or an older backup into a newer version — DataGerry migrates the data on start, as with an update. Restoring a backup from a newer version into an older DataGerry is not supported.
Note
A license is bound to the machine it was activated on. Restoring onto a different machine keeps all data, but the instance falls back to Community until you activate a re-issued license — see License Management.
Test your backups
A backup you have never restored is a hope, not a backup. Restore into a separate test installation
from time to time — set a different database_name or use a separate MongoDB — and sign in to
check the data.