mirror of
https://github.com/moghtech/komodo.git
synced 2025-12-05 19:17:36 -06:00
Backing up Komodo settings (possibly also DB change) #136
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gitcatpeter on GitHub (Nov 23, 2024).
Is there any way to backup and export Komodo core settings? Like all server configs, stacks and so on...
How much is kept in TOML and how much can be dumped from a DB.
And then restore to a vanilla install?
Second part of that question is changing DB type e.g. postgres -> mongo. Is there a way to somehow convert DB dump or something?
I had unexplained postgres failure and even though it eventually recovered I lost some confidence in it (latest Komodo, latest postgres and ferret). Which is strange. because for years postgres has been rock-solid for me.
@mbecker20 commented on GitHub (Nov 23, 2024):
Yes, there is the Resource Sync to help with this. Lets say you want to set up Komodo again with a new database backend:
The high level steps will be:
Specifics:
To start, note that you cannot export either Users or Git / Docker Providers, lets deal with that first.
For Users, they will have to recreate their account and onboard again. You will lose any specific Permissions attached to Users if you delete the database data. The solution is to migrate all user specific permissions to User Groups which can be included in Resource Toml: https://komo.do/docs/sync-resources#user-group. Non-admin users just need to create their users again with the same username. Admin users can use any username / have no restrictions.
For the Git / Docker Providers, move them all to the
core.config.toml: https://github.com/mbecker20/komodo/blob/main/config/core.config.toml#L397. Either this, or you must re-add them via the UI.The settings for Komodo itself are in the config files (
compose.yaml,compose.env,core.config.toml). Just copy these somewhere safe to backup if the server is being formatted.For the Resources, everything is in the TOML files. Export them before taking down Komodo.
Assuming all your user permissions are moved to User Groups, and your Git / Docker Providers are in your
core.config.toml, you can follow the below steps.Tomlexport button. Copy the contents.Sync, choose UI Defined, and paste in your Resource Toml you copied before.Let me know how it works out 🦎
@gitcatpeter commented on GitHub (Nov 24, 2024):
Thank you for that detailed instruction! I'm going to try it asap.
What is your experience or recommendation for a backend DB for Komodo.
We're talking about a homelab with ~200 docker stacks.
Have you seen any issues with ferret+postgres? That additional translation layer could potentially cause issues.
Is my decision to go back to MongoDB warranted?
@mbecker20 commented on GitHub (Nov 24, 2024):
Komodo uses the mongo driver internally, I've been using it for years and haven't had any problems with it. It has a nice GUI explorer with Compass: https://www.mongodb.com/products/tools/compass. While I don't think Postgres will have any issues insofar as the number of your resources, I don't see the advantage of PG if your host supports Mongo. I mainly added the Sqlite / Postgres options for compatibility with hosts that don't support Mongo.
I realize there is no need to take down your old Komodo, you can deploy the new Komodo using Mongo alongside the old one, and make sure the new one is working before taking the old one down.
@R-Nabil commented on GitHub (Jul 11, 2025):
Hi,
FOllowing up on that question. Is there a way to do it in a simpler way (the export ressource part) ? As in : why not have a Sync that syncs from the changes made in the UI to a Git Repo defined (with the same approach of execute/commit) ?
That way, the UI stays the main interaction but we also keep ressources in sync in a GitRepo.
@mbecker20 commented on GitHub (Jul 14, 2025):
I have considered it through something like an auto commit flag on the Sync settings
@R-Nabil commented on GitHub (Jul 14, 2025):
Im a big fan of IaC so from my point of view this would be a great feature :)
On 14 Jul 2025 at 14:12 +0800, Maxwell Becker @.***>, wrote:
@mbecker20 commented on GitHub (Aug 26, 2025):
There is now the database backup feature: https://komo.do/docs/setup/backup