Is there any way to "back up" the docker container initialization commands for easy redeployment on a new system? Let's say I have 10 docker containers with apps like Sonarr, Radarr, NZBGet, etc., running in them. I've got volumes and bind points showing these containers where my data is stored on my OMV system. I've got passwords, account information, etc., all stored within the apps. Is there any way I can backup/restore these containers on a new system without having to individually go in and set up the docker containers and point them to locally-stored .conf files?
Backup docker containers for easy deployment
-
- OMV 3.x
- lh1983
-
-
Docker save command does something like this, but attached volumes are lost, so at the end is pointless. Best is to stop the daemon, and backup /var/lib/docker, this can or cannot be reliable depending on the storage driver imo. I think ext4 with overlay driver should be ok, btrfs and zfs can get more complicated.
-
another option is to mantain a docker compose file with all your containers configurations, port maps, volume maps etc.
-
-
Looks like I'm going to have a lot of reading to do on docker compose. I'll confess I don't really understand a lot of the syntax, but that's just my lack of familiarity with the system, I'm sure.
-
another option is to mantain a docker compose file with all your containers configurations, port maps, volume maps etc.
This!
Looks like I'm going to have a lot of reading to do on docker compose. I'll confess I don't really understand a lot of the syntax, but that's just my lack of familiarity with the system, I'm sure.
I was in the same boat and found that the time invested was well worth the flexibility afterwards. Something that was particularly helpful was learning that there are usually sample docker compose yml files at the maintainer's github project. That, combined with a lot of trial and error, helped me learn about docker compose. If you're having trouble with any specific configurations, just go ahead and post, there are several knowledgeable members here that can help.
-
-
-
That's a really cool concept - thanks for sharing it!
-
The best way is to use docker-compose instead of omv docker-plugin.
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!