Backup OMV6 OS drive

  • What is the recommended method to backup the OS on an OMV6 installation? I am referring to back up of OS drive which in my case is on a USB drive.


    I wish OMV6 had a way to just save the settings to a configuration file that can be ported to a another OS drive. This should work as long as the data drives haven't changed. Just my wish list.

  • which in my case is on a USB drive.

    How big is it?


    The way I do it (some other's also, other's different) is to powerdown the server and make a clone on another PC (I use windows with Win32DiskImager).

    Then I flash the image to an exact equal drive and use the new one to see if it works.

    The old one is keept safe until I rotate this again.


    other's make a full dd image online and then keep that image safe.

    But this should be tested frequently to see if it works.

    A backup is only valid if tested to be functional.

  • I prefer to make a clone or an image with Clonezilla or usbimager.


    Others just use dd.


    And there is the backup plugin to make a backup of the live system.


    Either way, the backup is easy, but you need to spend some time to test the restore process. You do not have a backup until you know how to restore.

  • Thanks for the responses.


    My OS is a 32 GB USB stick.


    I was considering to use dd as I have used it on my raspberry pi, something like


    dd bs=4M if=/dev/sda of=/target_location/backupimage.img status=progress


    But I wasn't sure if that was the recommended method for OMV. I will checkout the backup plugin as well. My goal is to have an automated way to make a monthly backup of the image and maybe keep n & n-1 images.


    Another question: I don't think my entire 32 GB is used by the OMV installation. Anyway to shrink the backup image? something like image-shrink as part of the utils package here? I guess shrinking will also help me downgrade to a 16GB drive, since I don't have a matching 32GB one.

  • But I wasn't sure if that was the recommended method for OMV. I will checkout the backup plugin as well. My goal is to have an automated way to make a monthly backup of the image and maybe keep n & n-1 images.


    Another question: I don't think my entire 32 GB is used by the OMV installation. Anyway to shrink the backup image? something like image-shrink as part of the utils package here? I guess shrinking will also help me downgrade to a 16GB drive, since I don't have a matching 32GB one.

    The backup plugin has pretty much thought of all this. Just use the fsarchiver option.

    omv 6.0.33-1 Shaitan | 64 bit | 5.15 proxmox kernel | plugins :: omvextrasorg 6.1.1 | kvm 6.1.22 | mergerfs 6.1.1 | zfs 6.0.11
    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Would you please give me the exact name of the backup plugin?

    openmediavault-backup


    I just want to check online for more info on the backup plugin.

    What do you want to know. I wrote it.

    omv 6.0.33-1 Shaitan | 64 bit | 5.15 proxmox kernel | plugins :: omvextrasorg 6.1.1 | kvm 6.1.22 | mergerfs 6.1.1 | zfs 6.0.11
    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Just looking up usage instructions and see if anyone has had issues that they have run into.

    It should be self explanatory. There are a few long restore threads (since that cannot be done from the plugin or any other backup method). If you want to see how it works, look at the script that does the real work instead of reading what someone else might *think* it does.

    https://github.com/OpenMediaVa…aster/usr/sbin/omv-backup

    omv 6.0.33-1 Shaitan | 64 bit | 5.15 proxmox kernel | plugins :: omvextrasorg 6.1.1 | kvm 6.1.22 | mergerfs 6.1.1 | zfs 6.0.11
    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.
    Please don't PM for support... Too many PMs!

  • I wish I acumen to understand the script.


    I have installed the plugin you had recommended fsarchiver. is there any documentation on the details of what each option means?


    from the backup config page:


    dd - use dd to clone the OS partition to a compressed image file.

    dd full disk - use dd to clone the entire drive to a compressed image file.

    fsarchiver - use fsarchiver to clone all partitions to an archive file

    borgbackup - use borgbackup to backup the system to an archive file

    rsync - use rsync to sync files to the destination directory



    Isn't dd and dd full disk the same? Isn't OMV using the entire drive for the OS ?



    I ran the dd full disk option. It produces a bunch of files. How do I restore to another drive?


    Apologies for the dumb questions.

  • Do you understand the difference between partition and disk?

    Do you understand how partitions are used in Linux?

    Did you read that ryecoaaron recommended to use the fsarchiver option?


    So many questions, and there is google.

    fdisk -l will show your partitions . Here is my boot "disk"

    And this is how it is mounted (mount)

    Code
    /dev/mmcblk0p2 on / type ext4 (rw,noatime,nodiratime)
    /dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,flush,errors=remount-ro)

    This is a Pi, x64 will be different, bit I do not have access to it right now.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • I also recommend openmediavault-backup plugin using fsarchiver option.


    It compresses the drive partition so doesn't use a lot of storage. It has been recently updated to also backup the EFI partition for modern systems.


    I also rsync the backup daily to google drive in case of a disaster.


    In case of a failure, I restore the backup via SystemRescue using this guide.

    I plan to rewrite/update the guide with the EFI part so we'll have a good reference.

    OMV BUILD - MY NAS KILLER - OMV 6.x + omvextrasorg (updated automatically every week)

    NAS Specs: Core i3-8300 - ASRock H370M-ITX/ac - 8GB RAM - Sandisk Ultra Flair 32GB (OMV), 256GB NVME SSD (Docker Apps), Several HDDs (Data) w/ SnapRAID - Fractal Design Node 304 - Be quiet! Pure Power 11 350W


    My all-in-one SnapRAID script!

    Edited once, last by auanasgheps ().

  • Using fsarchiver you need to be aware that it backups the content of a filesystem. So to restore you need to have the appropriate partitions and filesystems. Before restoring to a new SD card or USB stick you need to create these partitions and filesystems.

  • Using fsarchiver you need to be aware that it backups the content of a filesystem. So to restore you need to have the appropriate partitions and filesystems. Before restoring to a new SD card or USB stick you need to create these partitions and filesystems.

    That is why the plugin creates a backup of the partition table. So, you can restore the partition table and then use fsarchiver.

    omv 6.0.33-1 Shaitan | 64 bit | 5.15 proxmox kernel | plugins :: omvextrasorg 6.1.1 | kvm 6.1.22 | mergerfs 6.1.1 | zfs 6.0.11
    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.
    Please don't PM for support... Too many PMs!

  • In case of a failure, I restore the backup via SystemRescue using this guide.

    I plan to rewrite/update the guide with the EFI part so we'll have a good reference.

    Thanks for the restore links. I will be looking for that rewrite/update, especially to see it formatted properly in the Guides section.


    Anybody who has read my posts know I bang the dd drum, mostly because it has just a few simple steps for both backup AND rescue. The only drawback is that it is not automated. This restore info will make me revisit the plugin.

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

  • I tested a full disk recovery using the updated plugin with the EFI partition backup.

    Yes, it works: now the plugin is able to restore a full system disk loss on EFI systems as well!
    Thanks ryecoaaron for adding this feature so quickly.


    I have written some notes, will make a proper procedure which I'll post in the Guide section Agricola :)

    OMV BUILD - MY NAS KILLER - OMV 6.x + omvextrasorg (updated automatically every week)

    NAS Specs: Core i3-8300 - ASRock H370M-ITX/ac - 8GB RAM - Sandisk Ultra Flair 32GB (OMV), 256GB NVME SSD (Docker Apps), Several HDDs (Data) w/ SnapRAID - Fractal Design Node 304 - Be quiet! Pure Power 11 350W


    My all-in-one SnapRAID script!

  • My understanding of partitions and their usage in Linux is limited.


    I read the recommendation to use fsarchiver, but my question still remains unanswered. what does fsarchiver do and how's it better than the dd options?


    Also how to restore after I make a backup?


    I understand there is google, but forums are there for a reason. Not everything can be found on google. And i cetainly don't get how your fdisk -l and mounts response explain my questions.

  • Thanks. I will check out systemrescue cd.

  • Using fsarchiver you need to be aware that it backups the content of a filesystem. So to restore you need to have the appropriate partitions and filesystems. Before restoring to a new SD card or USB stick you need to create these partitions and filesystems.

    Thanks for explaining how fsarchiver does its job.

    That is why the plugin creates a backup of the partition table. So, you can restore the partition table and then use fsarchiver.

    One question: Can the omvbackup tool functionality be expanded to be able to restore to a new boot drive? i.e. while you are booted into OMV6, user plugs in another drive and copies the backup just created into the new drive.


    I guess there is chances that people may flash to their data drives. So risk is there.

    Thanks for the restore links. I will be looking for that rewrite/update, especially to see it formatted properly in the Guides section.


    Anybody who has read my posts know I bang the dd drum, mostly because it has just a few simple steps for both backup AND rescue. The only drawback is that it is not automated. This restore info will make me revisit the plugin.


    Since you are the dd person, would you explain how these two options are different?

    dd - use dd to clone the OS partition to a compressed image file.

    dd full disk - use dd to clone the entire drive to a compressed image file.

  • What I do is a “cold” backup. After the server is shut down, I backup the os (usb flash media or sd card) using the dd command on my desktop machine. The Omv-backup plugin performs a “live” backup right on/in the server while it is still running. My way always involves the second step of recovery by cloning the just-created .img file to the backup usb flash media which then becomes the new os drive. I rotate my drive at each backup so that main becomes backup and backup becomes main at each go. Put another way, each backup I do is verified by putting it in service at once.

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

Participate now!

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