Back up - OMV & Portainer

  • Hi,


    Is there away to back up back OMV and Portainer, i need to rebuild the Debian OS on my server after some how managing to fudge up an upgrade. I was hoping to find out if there is away to back OMV with all its shares and add on and also back up Portainer with all the docker images?

  • after

    The time to close the gate is before the horses get out, not after. If you never moved your Docker Storage location from the default location /var/lib/docker then that poses another potential problem. You probably should take some screen shots and jot down some notes and reinstall omv from scratch.

    Easy data backup: In a Scheduled Job: rsync -av --delete /srv/dev-disk-by-label-SOURCE/ /srv/dev-disk-by-label-DESTINATION/ (HT: Getting Started with OMV5)
    OMV 5 (current) - Thinkserver TS140, Nextcloud, Plex, Airsonic, Navidrome, Ubooquity, Digikam, Wetty, & Heimdall - NanoPi M4 (v.1): backups using Rsync and Rsnapshot - Odroid XU4 (Using DietPi): PiHole - hc2, xu4, Pi 3B+, Odroid H2, and VirtualBox: Testing and playing - Mac user converting to Linux, Debian 10 KDE.

  • Hi,


    Is there away to back up back OMV and Portainer, i need to rebuild the Debian OS on my server after some how managing to fudge up an upgrade. I was hoping to find out if there is away to back OMV with all its shares and add on and also back up Portainer with all the docker images?

    IF you have ssh access.. you could back up your containers by moving /var/lib/docker to another folder off your os drive .


    As for portainer, if you installed portainer with the button in OMV.. probably not. Just go through and make screen shots or if you have any custom stacks . Copy those to a text file and save them.


    Now in the future...


    1. Make sure your containers are saved somewhere on your data drives, not your os drive.


    2. Make sure you have a Portainer data folder set up. See this post


    RE: Portainer is starting in generic mode.


    You'll have to install portainer with that docker-compose (adjust to your needs)..


    Now if you reinstall... Just point the docker plugin at your docker folder on your data path. As long as nothing has changed (paths, etc.).. docker and portainer will fire up like nothing happened.


    This is why I only use symlinks for my docker volume locations, it makes them easy to remember and makes reinstalling a 2min ordeal, no matter what my UUID's, labels, etc. may be

    Air Conditioners are a lot like PC's... They work great until you open Windows.


    Edited once, last by KM0201 ().

  • The time to close the gate is before the horses get out, not after. If you never moved your Docker Storage location from the default location /var/lib/docker then that poses another potential problem. You probably should take some screen shots and jot down some notes and reinstall omv from scratch.

    Hey,


    i'm am going to start from scratch, is there a bash script that will install OMV5? i found this one

    Code
    sudo wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash

    but it install OMV6 which i want to wait till its fully stable and out be i use it, but for the moment i want to use OMV5

  • I've always wondered how that backup worked... never tried it. I just set portainer to a data folder, and everything is stored there. Does it save your stacks, etc.. so they can be edited on the new install? That is one thing I like about having a data folder assigned to portainer

    Air Conditioners are a lot like PC's... They work great until you open Windows.


    Edited once, last by KM0201 ().

  • If you start with Buster (Debian 10) it should install OMV5. You might have started with Bullseye (Debian 11)

    This is what caused the problem in the first place, trying to upgrade to Deb 11.


    About 2 weeks ago my OMV5 kept spitting out errors and sending me this by email notification

    Code
    CRON-APT LINE: /usr/bin/apt-get update -o quiet=2
    E: The repository 'http://security.debian.org/debian-security bullseye/updates Release' does not have a Release file.
    W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://ftp.de.debian.org/debian jessie Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7638D0442B90D010 NO_PUBKEY CBF8D6FD518E17E1
    E: The repository 'http://download.virtualbox.org/virtualbox/debian bullseye Release' does not have a Release file.

    Which was weird as i hadn't touched anything but for some reason it refused to update, so i found this guide to upgrade to Deb 11

    https://ostechnix.com/upgrade-…ye-from-debian-10-buster/


    Got to step 3 and i had a powercut :/ so once power was restored tried again but now i kept getting an error about "pam_tally" and to change it and the upgrade errored out


    Tried step 3 another time but still the same, gave up that when i found OMV5 had updates but none would install, tried to undo the guide i was following but still no luck the system still kept looking for Deb 11 repo's.


    So come to today download a fresh copy of Deb 11 but now stuck as the only script i can find install OMV6

  • So do you want OMV 5 and Debian and 10, or omv 6 and Debian 11?


    From the looks of it, you had a virtualbox repository enabled and it was trying to pull in a bullseye update. Had you just removed those repositories, you would have been fine. There really wasn't anything in that error to be concerned about other than it wouldn't upgrade to bullseye (unless you were intentionally doing that.. then that would have broken OMV anyway)

    Air Conditioners are a lot like PC's... They work great until you open Windows.


  • OMV5 will only work on Debian 10. And OMV6 only on Debian 11.


    So for now you have to install Debian 10 first and then use the script to install OMV5. Or use the ISO.


    If you have issues with the Debian10/OMV5 combo, post the error here. In that case it might be there is an issue with the repo, e.g. using bullseye instead of buster.

  • Hi,

    Everything is rebuilt but i have another problem. When i try and command into a drive/folder using SSH/root login it says the folders/drive not there but if i run lsblk its says the folder/drive is there but when i restart it allows me to cd into the folder/drive but after while it will say the folder/drive does not exist and i have to restart again they are all picked up in OMV fine with no issues

  • That's weird... Maybe it's picking up an extra character or something you're not seeing.


    Try this


    cd /srv/dev then hit the tab key.. This will auto-complete you until there are multiple options (so it will probably fill in /dev/disk-by-uuid- )


    Then enter the first few characters of the id for the drive you want to enter... so in the pic you put above... 314 then hit tab again.. and it will auto complete the path for you.


    Hit enter, and see if it lets you change paths.

    Air Conditioners are a lot like PC's... They work great until you open Windows.


  • Yeah that work, thought i would try the nor command first that said no and then tried the way you said and it worked


    Strangest thing i remember setting all of these drives up with there on individual names


    so

    /srv/dev-disk-by-uuid-314f3cc6-0285-48b9-b6d5-57669b1dd616


    i originally set the name to

    /srv/dev-disk-by-fileserver


    its only after this rebuild the names have changed

  • As macom said... that changed because of some problems that effected some users w/ a particular external enclosure chipset.


    If you want "friendly" command line locations... symlinks are a great way to do this.. especially using them in docker-compose.


    A simple example form my OMV 6 test. You can tell by the -> that the directories under "NAS" are just simple links (or shortcuts) to directories with the much larger UUID's.


    Code
    joe@omv6-test:~$ cd /NAS/
    joe@omv6-test:/NAS$ ls
    AppData Media
    joe@omv6-test:/NAS$ ls -l
    total 8
    lrwxrwxrwx 1 root root 66 Aug 28 10:01 AppData -> /srv/dev-disk-by-uuid-b83f2343-f13e-4066-9f3a-55dfe8ce8f2b/AppData
    lrwxrwxrwx 1 root root 77 Aug 28 10:02 Media -> /srv/dev-disk-by-uuid-b83f2343-f13e-4066-9f3a-55dfe8ce8f2b/Test_Disk_1/Media/
    joe@omv6-test:/NAS$

    Air Conditioners are a lot like PC's... They work great until you open Windows.


  • STUKguy

    Added the Label resolved

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!