A couple of issues basically need some help with backup of OMV setup

  • Okay so for whatever reason when I restart my server sometimes it will just randomly say “insert boot media” even though it’s fine and in the past the only way to fix it has been by fresh installing OMV because before I didn’t have anything setup. I also know it’s a problem with the server mobo most likely since it boots fine on my personal pc. Only problem is this time I have some 12 docker containers, an OpenVPN setup, a couple of users, and a bunch of shared folders. So fresh installing would be a pain in the ass. I tried using the backup plugin with the dd -fulldisk command or whatever it is which I assumed would give me an image or disk file but I wasn’t really sure what to do with the resulting .gz files and stuff and at this point I would be fine with losing everything else as long as I can keep my docker files.

    So finally if you read through all of that I have 2 questions: Can anyone guide me through the process of backing up and restoring a full backup of the OMV setup, or if not that am I able to just save the var location where all my docker containers are, fresh install OMv and docker, and just paste all of it back in?

    THANK YOU TO ANYONE IN ADVANCE!!

    Edit: I’m able to run it fine on my own pc so I can basically do anything I would need to, to back it up

    Also my OMV boot drive is an m.2 and I do have hella flash drives and the boot drive only has used about 20 gb of its 512gb available

    • Offizieller Beitrag

    If you store your containers on your storage drives.... And all the paths in your dockers are the same (volumes, ports, etc .)... All you have to do is install docker, add your path to your container folder in the omv-extra setup tab,.save. then all your containers will be back

  • I store my containers in the default location but since I can just connect my ssd to my main pc and copy the files over can I just copy them back after I fresh install? Like copy them back to the default location. Other thing is the folders such as tests and stuff wouldn't copy over because the filename was too long. Are those essential folders to docker?

    • Offizieller Beitrag

    I'm not the person to ask about cloning... I consider it a total waste of time when I can have my server from bare bones to back where it is right now in less than an hour (and all docker services running in about probably 25).


    I'd probably spend more time cloning and restoring the image than I spend reinstalling.

    • Offizieller Beitrag

    yeah fair enough. for me the main omv setup wouldn't take much time but I have like 15 docker containers which I would rather not have to set all those up again.

    Well, again, as long as you set them up properly... you can literally have them all up in like 15min after you install.


    I've done it multiple times. It's really quite easy. The key thing is making sure your volumes/paths you use for docker, are consistent. Because if they aren't, you're going to make a mess.

  • thats true. Only problem is I use portainer so the gui takes a little longer rather than just copy and pasting everything. What I might just do is screenshot my portainer setups and I have like 2 stacks I can just save and just set everything up again since I have my configs saved on my media drives that don't get screwed up by my stupid motherboard. I really can't figure it out lol

  • Also would exporting and importing an image of my docker containers in portainer basically just do everything for me or am I interpreting that wrong? Does it just export the image like for example the linuxserver/plex image file or will it give me the the whole container ready to import to a new setup?

    • Offizieller Beitrag

    thats true. Only problem is I use portainer so the gui takes a little longer rather than just copy and pasting everything. What I might just do is screenshot my portainer setups and I have like 2 stacks I can just save and just set everything up again since I have my configs saved on my media drives that don't get screwed up by my stupid motherboard. I really can't figure it out lol

    I use portainer as well.... Again, IF you set everything up properly (I'm not saying you did or didn't, I'm just saying I've done this multiple times so I know it works)... You won't have to even worry about it... as soon as you point docker at your containers folder, all of your containers will be set up and running as the were before you started.

    • Offizieller Beitrag

    Also would exporting and importing an image of my docker containers in portainer basically just do everything for me or am I interpreting that wrong? Does it just export the image like for example the linuxserver/plex image file or will it give me the the whole container ready to import to a new setup?

    No.. what you need to be concerned about is your appdata folder, and containers folder, and where your media (that docker accesses) is installed and the paths are consistent on the old install and new install.

  • The majority of docker applications just use the specified volume right? like my config folders is what I assume you mean by AppData? So as long as I have the config folders I should be fine? or do I also need the docker files that docker stores in var/lib/docker that I was referring to earlier

  • gotcha I understand. That would be great don't feel any pressure to respond to these right now. But just so simplify...

    1. Backup entire /var/lib/docker directory

    2. Fresh install omv

    3. Reinstall omv-extras...docker...portainer...etc.

    4. Copy over old /var/lib/docker files

    5. When portainer is launched as long as the /var/lib/docker directory was properly copied and as long as the config files are attatched and mounted in omv all of my container should just show up? or I will need to set them up again, but they will still have the previous setup due to the config files or the var/lib/docker files?

    • Offizieller Beitrag

    Basically yes, but personally... I map my containers folder (/var/lib/docker) onto my storage drive... then if you look in the docker-plugin, all you have to do is put the absolute path to the containers folder on your storage drive... and that's it

  • gotcha, and to go about doing that I would simply just copy the docker file on the storage drive and once I set up the new installation of omv and plug everything in I would just set the docker location to that and it would have everything ready no container setup required?

    • Offizieller Beitrag

    gotcha, and to go about doing that I would simply just copy the docker file on the storage drive and once I set up the new installation of omv and plug everything in I would just set the docker location to that and it would have everything ready no container setup required?

    I don't normally do it that way, but in theory... yes it should...

    https://drive.google.com/drive…3q186vhAzEZQB?usp=sharing


    Looking at the above is a virtual machine I do a bunch of junk in to test.


    Pic 1 -- Just to show I have 6-7 containers running. They all work just fine.. I don't have a ton data on them as it is strictly for testing, or occasionally helping someone with a tricky container.


    Pic 2 -- Shows the absolute path where I store my containers.


    Pic 3 -- I started reinstalling the virtual machine (note the time in the upper right). 11:49


    Pic 4 -- On the left, you can see I've installed omv-extras, and the symlink plugin (I also installed docker but you can't see it here).. and at this point I'm mounting my 20gig 'data' partition.


    Pic 5 -- I created user "joe" (who is always my dummy user on my virtual machines.. long story). Not pictured, I ssh'd the server, created a folder on the root partition called /NAS and then chowned that folder to joe so he could write it (chown joe:users /NAS)


    Pic 6 -- I used the symlinks plugin to create some symlinks between my AppData, Data, and Media folders. These are all folders that various docker containers I use, access. So my paths in for my volumes in container setups will be /NAS/AppData , /NAS/Media/Movies , etc. This is something I just implemented a few days ago after the UUID change... thus far it's not causing me any problems so I'll eventually change my server over.. but I've got 16-17 containers running there so that will take more time.


    Pic 7 -- I added the absolute path to my Containers folder back to the new docker install, and restarted docker


    Pic 8 -- Launched Portainer, and all my Containers are all set up, etc.. just as they were back in step 1. So I'm done and all my containers are back online, 12:12


    11:49-12:12... so right at 20min. Truth is, I could have done it faster had I not been stopping to take screenshots, etc. If that were my actual server.. the only thing I'd have left to do is set up my NFS shares (about 5min) and set up a couple rsync jobs I use for backup (about 5min or so)

  • Sorry for the late response I read this post a couple of times first haha. So 2 things, do you need to use a Symlink? Couldn't you instead just directly reference the folder? I assume chowning the folder is only necessary because of using Symlinks(which I don't fully understand myself). Does it work to just copy the folder and set the location or do those permissions need to be allowed? (Also side note do you know of a way to get the stack file for a container that you created visually in the portainer gui?)

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!