Small bug in openmediavault-backup 1.0.11

  • Hello, my name is Robert and i live in Austria. I've been playing with OMV for a couple of weeks and i am impressed with its features and its usability (speed of webinterface and layout). I specially like the virtualbox plugin and snap-raid (which i had no time to configure yet).
    I the system backup tab from th openmediavault-backup 1.0.11 plugin i think i found a small bug. It is essentially a rsync and after that two dd for the bootsector. The dd command makes a backup from sda1 which is useless IMO it should be sda.
    In /usr/share/openmediavault/mkconf/backup there is a line :
    SYSDRIVE="$(ls -l /dev/disk/by-uuid/ | grep $SYSDRIVE_UUID | awk '{print $11}' | sed 's/..\/..\///g')"
    which gives as Result: sda1.
    I modified it to:
    SYSDRIVE="$(ls -l /dev/disk/by-uuid/ | grep $SYSDRIVE_UUID | awk '{print $11}' | sed 's/..\/..\///g' | sed 's/1//g')"
    now the result is sda.
    I am sure there is a better way but i didn't know how.


    best regards.
    robert

    • Offizieller Beitrag

    Yep, you are right. I guess it shows how many people use the boot sector/partition table when recovering since the plugin has been this way a long time. The plugin makes a list of uuids as well. So, it is easy to make partitions, change uuids to uuids found in file, and re-install grub instead of using the dd files.


    You can't assume the boot partition is 1 and removing 1 is dangerous for mmc users. It should only remove the last number. I will fix when I get a chance.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I was quite sure there is a better way. It would also make more sense to install grub after copying all the files to a new disk (and updating /etc/fstab). Is there a script or at least a howto?
    I guess it would go like this:
    -) partition new harddisk
    -) get the UUIDs
    -) update fstab
    -) install grub


    Did i forgot something?

    • Offizieller Beitrag

    Here is the original thread for the internals of the plugin. Very difficult to script if anything changed from the previous setup.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

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