New to OMV and Linux

  • Hi all , I just finish to install OMV with help from @TechnoDadLife . Everything went smooth with no issues at all and now need to move forward and setup all other small things. But before that I have some question to find the best way.


    Plugins and dockers are taking space from the same media where the system is installed?


    If I am using OMV backup utility to backup the system , if I reinstall from the backup , Iwill have all setings , plugins and dockers or is just the OS? I am planing to use a 64GB usb drive for OS backup.


    Seen on @TechnoDadLife that he created an "AppData" folder "outside" of the OS media....is this something recommended, what is on that folder more exactly and how big can became over time?


    I have an external USB HDD which I plan to use it for weekly backups of the entire system. Can I keep it connected all the time over the USB and can I create a schedule for auto backup or it will be much safer to keep it disconnected and just plugin for backup.
    Also is there any option to create a backup but the same way if I would make copy paste of each folder? I just want to be able to use the 8TB HDD on a windows pc straight away and have exactly the same folders and not some strange files which I can only restore with the same software( plugin in this case) I did the backup.


    Sorry for the long post......

    For now ( first setup)
    Gygabite G1 Sniper mobo
    Intel I7 960 quad core
    Asus AMD R5 230 video card
    10Gtek® Intel 82576 Chip Gigabit Ethernet Converged Network Adapter (NIC), Dual RJ45 Copper Ports, PCI Express 2.0 X 1
    12GB DDR3 @1600
    32GB SSD for OMV system
    2 x 3TB 3.5" HDD
    1 X 1TB 2.5" HDD
    Corsair case and Zetec 650W PSU


    Runing latest versio ( stable )

    • Offizieller Beitrag

    You want to minimize writing to flash memory, or it will wear out faster. That is why it is good to have apps on the root file system but their data on a data partition. It also makes it possible to backup the data separate from the root file system and the apps. Also this makes the root file system pretty static and you don't have to back it up often.


    Things that change should be on tempfs or on a data partition. Things that don't change can be on the root fs. At least as much as possible.


    I remove my flash memory (SD-cards) and create a image files of them. I do this after I change or add something significant. Or before and after a big upgrade.


    The contents of the data partitions I typically "snapshot" using rsync, to some other data partition on the network. At least the parts I care about.


    I believe OMV has a plugin for USB backups, named "usbbackup". When you attach the drive a backup is automatically made. It might be good to have two tiers of backups. To some drive on the network and to an USB-drive you store away from the servers.


    I also have a HC2 that has the rootfs moved to sda1 on an SSD. For that I boot using another SD-card and make a rsync snapshot of the the offline rootfs to another volume on the network.

  • If I understand correctly the root folder is like "Windows" folder , AppData is like "Program Files" folder and the plugins are like "programs" ( the .exe files).
    The docker been a plugin I assume that is also like a program( an .exe file on windows)
    If all this assumption are right then the best way is to have all dockers on one of the data hdd and not on the SSD with OS?
    Or the docker and similar plugins are essential parts and they need to stay with the OS and only the plugins like Plex , Transmission needs to go on the data HDD?
    Or should I have all plugins on the OS media and only to change the data for them on the AppData folder?
    If the latest is the way to do it how can I change this ( didn't find any video or tutorial on how to do it).

    For now ( first setup)
    Gygabite G1 Sniper mobo
    Intel I7 960 quad core
    Asus AMD R5 230 video card
    10Gtek® Intel 82576 Chip Gigabit Ethernet Converged Network Adapter (NIC), Dual RJ45 Copper Ports, PCI Express 2.0 X 1
    12GB DDR3 @1600
    32GB SSD for OMV system
    2 x 3TB 3.5" HDD
    1 X 1TB 2.5" HDD
    Corsair case and Zetec 650W PSU


    Runing latest versio ( stable )

    • Offizieller Beitrag

    Could you enlighten us like me how to do it in detail? :D


    Sure, but it is a bit of a stupid brute force hack. But, hey! If it works it ain't stupid! You have to adapt it... I googled and combined what I found into two scripts. The layout and names of the partitions of the SD-card may differ for different SBCs and computers. This is for Odroid HC2 (and XU4/HC1) and a HP laptop. I run the scripts on my Linux laptop (it has an SD-card reader) in different folders depending on what SD-card I am working with. For nas1 I work in ~/sd_cards/nas1. Each folder nas1-nas4 has a subfolder images where the images ends up. I read the start of the SD-card with dd to get the MBR, but also the MBR partition table and some junk. And then I use partclone to read the partitions. And I write the MBR and at the same time the MBR partition table that I use to have partclone use (after some pauses and flushes for good measure) to write the partitions.


    Bash: backup_sdcard.sh
    dd if=/dev/mmcblk0 of=./images/MBR.img bs=512 count=10000
    partclone.ext4  -c -s /dev/mmcblk0p1 -o ./images/mmcblk0p1.pcl
    partclone.btrfs -c -s /dev/mmcblk0p2 -o ./images/mmcblk0p2.pcl
    Bash: restore_sdcard.sh
    dd if=./images/MBR.img of=/dev/mmcblk0 bs=512
    sleep 5
    flush
    sleep 5
    partclone.ext4  -r -s ./images/mmcblk0p1.pcl -O /dev/mmcblk0p1
    partclone.btrfs -r -s ./images/mmcblk0p2.pcl -O /dev/mmcblk0p2
  • Sure, but it is a bit of a stupid brute force hack. But, hey! If it works it ain't stupid! You have to adapt it... I googled and combined what I found into two scripts. The layout and names of the partitions of the SD-card may differ for different SBCs and computers. This is for Odroid HC2 (and XU4/HC1) and a HP laptop. I run the scripts on my Linux laptop (it has an SD-card reader) in different folders depending on what SD-card I am working with. For nas1 I work in ~/sd_cards/nas1. Each folder nas1-nas4 has a subfolder images where the images ends up. I read the start of the SD-card with dd to get the MBR, but also the MBR partition table and some junk. And then I use partclone to read the partitions. And I write the MBR and at the same time the MBR partition table that I use to have partclone use (after some pauses and flushes for good measure) to write the partitions.


    Bash: backup_sdcard.sh
    dd if=/dev/mmcblk0 of=./images/MBR.img bs=512 count=10000
    partclone.ext4  -c -s /dev/mmcblk0p1 -o ./images/mmcblk0p1.pcl
    partclone.btrfs -c -s /dev/mmcblk0p2 -o ./images/mmcblk0p2.pcl
    Bash: restore_sdcard.sh
    dd if=./images/MBR.img of=/dev/mmcblk0 bs=512
    sleep 5
    flush
    sleep 5
    partclone.ext4  -r -s ./images/mmcblk0p1.pcl -O /dev/mmcblk0p1
    partclone.btrfs -r -s ./images/mmcblk0p2.pcl -O /dev/mmcblk0p2

    Oh well, at least you have got me order Odroid HC2 from Korea and get to know about partclone.
    Many many thanks!


  • Sure, but it is a bit of a stupid brute force hack. But, hey! If it works it ain't stupid! You have to adapt it... I googled and combined what I found into two scripts. The layout and names of the partitions of the SD-card may differ for different SBCs and computers. This is for Odroid HC2 (and XU4/HC1) and a HP laptop. I run the scripts on my Linux laptop (it has an SD-card reader) in different folders depending on what SD-card I am working with. For nas1 I work in ~/sd_cards/nas1. Each folder nas1-nas4 has a subfolder images where the images ends up. I read the start of the SD-card with dd to get the MBR, but also the MBR partition table and some junk. And then I use partclone to read the partitions. And I write the MBR and at the same time the MBR partition table that I use to have partclone use (after some pauses and flushes for good measure) to write the partitions.


    Bash: backup_sdcard.sh
    dd if=/dev/mmcblk0 of=./images/MBR.img bs=512 count=10000
    partclone.ext4  -c -s /dev/mmcblk0p1 -o ./images/mmcblk0p1.pcl
    partclone.btrfs -c -s /dev/mmcblk0p2 -o ./images/mmcblk0p2.pcl
    Bash: restore_sdcard.sh
    dd if=./images/MBR.img of=/dev/mmcblk0 bs=512
    sleep 5
    flush
    sleep 5
    partclone.ext4  -r -s ./images/mmcblk0p1.pcl -O /dev/mmcblk0p1
    partclone.btrfs -r -s ./images/mmcblk0p2.pcl -O /dev/mmcblk0p2

    Is there a way to mount or explore the contents of the image files?


    In general for Clonezilla (based on partclone), the answer is "no", but there are workarounds, including a separate tool called partclone-utils : https://drbl.org/faq/fine-prin…_read_ntfsimg_content.faq


    However, the above code uses partclone's "special image format" (what is that??) with the -c flag, and I have no idea what is possible in this case.

  • Try This.


    Code
    sudo mount -o loop mmcblk0p1.pcl /mnt

    Then look in /mnt and see what's there.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • One more try.



    Code
    sudo mount -o loop -t ext4 mmcblk0p1.pcl /mnt

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • gderf Exact same result as before.


    You can see the comment by Steven Shiau, who seems to be involved with Partclone, indicating that image files cannot be mounted without third party tools. https://sourceforge.net/p/part…n/638475/thread/a9448762/


    He also has a comment saying partclone-utils will be included in future releases (also mentioned in my other link above). That was a decade ago. Not sure if it has been. I find the documentation and examples rather terse, and haven't figured out what is possible.

  • I use dd alone and have no trouble looking inside images.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • Also, what does partclone do for you that dd doesn't?

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • Code
    Error: mmcblk0p1.pcl: unrecognised disk label
    Model:  (file)                                                            
    Disk mmcblk0p1.pcl: 59052s
    Sector size (logical/physical): 512B/512B
    Partition Table: unknown
    Disk Flags: 


    partclone vs dd... the former does not copy empty blocks which can save a lot of space in images, and that's before/without using any compression.

  • Looks like you will have to restore an image somewhere if you want to see what's inside it.


    My dd images are 16GB, a size that isn't a burden. I keep a week's worth of daily dd images of my OMV SSD. If I need to peek inside one it takes only a few seconds to mount the image.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

Jetzt mitmachen!

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