Recreate Unraid auto-update and auto-backup functionalities in Komodo using Borg #1012
ValentinVie
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
|
@ValentinVie Very nice! I'd like to read more but the link doesn't seem to work at the moment. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
Thank you for creating Komodo. Having decided to move towards Komodo to manage my docker containers, I followed the great blog article from foxxmd: https://blog.foxxmd.dev/posts/migrating-to-komodo/. I migrated all my docker containers templates from Unraid to docker-compose. It was a pain but I finally succeeded !
However, there were functionalities I needed to recreate to keep my previous setup working as is:
docker compose pullfollowed by adocker compose up -d --force-recreatecommand./mnt/user/appdatawith AppData Backup plugin. Basically, it created an archive containing a copy of a/mnt/user/appdatawhile keeping permissions intact.Here is the backup process I setup:
/mnt/user/Backups. Ideally on the array rather than on the cache drive... I personally also send all of the backup (encrypted) to AWS to follow proper 3-2-1 backup strategy.Borg calls for Komodo actions named auto-stop-stacks and auto-start-stacks during the backup route. These two actions start or stop the Komodo container stacks depending on their tags. Here is the interesting part of the config.yaml in borgmatic:
Here is the code I created for the Komodo actions called by borgmatic. You just have to provide at the very top of the script: your tag name, the command and the maximum wait time for the action to complete. The command keywords can be found here. To start the stack, use
StartStackand to stop the stack useStopStack... :I explain the whole process in a more detailed blog post here.
Maybe this "execute-action-on-object-(stacks)-with-this-tag-process" could be added to Komodo procedures in the future.
Hope that will help someone. It's not the most elegant solution but it's a solution that works and that scales pretty well with many stacks. If you want to change the backup policy and behavior you just have to change borg config.yaml or the tags associated with your Komodo stacks.
Beta Was this translation helpful? Give feedback.
All reactions