Back up system disk, a few questions.

  • Hello all,


    Can anybody tell me if its possible to back up the system disk, i.e. the disk that OMV is installed on?


    I have searched for an answer on the forum and found a few threads that recommend using the openmediavault-backup plugin, in conjunction with Clonezilla, which should appear in the plugin tab, but doesn't for me. All of these thread are a bit out of date, so I thought maybe something had changed.


    What would be the best way to back up my installation now and how far does that backup go? Does it back up all of the plugins, and setting and would that extend to shared drives, their permissions, R-Sync jobs, etc? I am guessing it backs up everything except the data, but it would be good to be sure.


    Thanks,
    Nick.

  • I suggest cloning the boot drive with Clonezilla. By this you have a 1:1 clone that is easy to restore.


    Which platform are you using? amd64 or arm?
    On amd64 you can boot into Clonezilla. Have a look at the kernel tab in omv-extras. This option is not available on arm.
    On arm you need to clone the SD card on another computer using either clonezilla, Win32diskimager, fsarchiver or something else.


    Another option is to use the backup-plugin. Backup is very easy with the plugin, but the restore process is a bit more complicated.

  • I have an arm system and I do a backup on the fly, as well as:



    Code
    pv /dev/mmcblk1 | gzip > /media/backup/Backups/omv_emmc_backup_$(date "+%d.%m.%Y").gz

    That had always worked well (over SSH)

    [LibreELEC @ 2x RPi3, CoreELEC @ S12 Octa Core]

    [ NAS OMV 5.xx (Usul) @ NanoPI M4 ]

    [ Nextcloud 18.0.4 @ ODROID C2 ]

    [ Motioneye @ RPi4]

  • Here’s an easy how-to for backing up your os on a sd card.


    These guides have a good backup section and should be helpful.

    RAID is NOT a backup and not useful for most home users. Rsync makes true backup and restoration stupid easy, and it's built right in to OMV. Use this command in a Scheduled Job: rsync -av --delete /srv/dev-disk-by-label-NAMEofSOURCEdisk/ /srv/dev-disk-by-label-NAMEofDESTINATIONdisk/

    Hardware: OMV 5 (current) - NanoPi M4: Nextcloud, Plex, & Heimdall - Acer Aspire T180: backup - Odroid XU4: Pi-Hole (DietPi) - Odroid HC2, Raspberry Pi 3B+, and HP dx2400: testing.

  • I suggest cloning the boot drive with Clonezilla. By this you have a 1:1 clone that is easy to restore.


    Which platform are you using? amd64 or arm?
    On amd64 you can boot into Clonezilla. Have a look at the kernel tab in omv-extras. This option is not available on arm.
    On arm you need to clone the SD card on another computer using either clonezilla, Win32diskimager, fsarchiver or something else.


    Another option is to use the backup-plugin. Backup is very easy with the plugin, but the restore process is a bit more complicated.

    Great, thanks, I have checked and I have it in the kernel tab so I will look at this when I get time and post back here when (not if) I get stuck!

    I have an arm system and I do a backup on the fly, as well as:



    Code
    pv /dev/mmcblk1 | gzip > /media/backup/Backups/omv_emmc_backup_$(date "+%d.%m.%Y").gz

    That had always worked well (over SSH)

    OK, that's good, too. Thanks for the suggestion. I am trying to get a bit more command line!

    Here’s an easy how-to for backing up your os on a sd card.


    These guides have a good backup section and should be helpful.

    Nice, thank you - I will have a read up on your links.


    Everyone - much appreciated and thanks for your time.


    Nick.

  • OK, back here again and I think I will try the CloneZilla option. I am reading this guide, I suppose this is still current? I'm not great at understanding the CL, so I am a bit stuck at the first bit: here's why:

    Code
    root@omv:~# cd /media
    root@omv:/media# ls

    OK, so this I can do, I ssh into omv, navigate to the media directory and list the files with ls. I get this:

    Code
    cdrom cdrom0

    Now, it looks as if, in the guide, the idea is to create the new backup directory in 89cc2475-6cea-480c-a1bf-7739ce10e83e, but I don't know what/where that is, and don't get anything similar from the ls command. Can anyone help here?


    Thanks,

    Nick.

  • At the time the guide was written, drives were mounted in /media/

    Now they are mounted in /srv/.

    So you need to create a folder on your data drives, which you will find in


    /srv/dev-disk-by-label-xxxxxx/


    xxxxxx is the label of your drive.

  • OK, many thanks, macom.


    I cd'd to srv and then used midnight commader to make the new directory there 'backups'


    I have already installed Clonezilla so I went ahead and hit the 'Reboot to Clonezilla Once' button, but it just gives this message:


    "Configuring grub to boot once from Clonezilla iso... 4"


    Any ideas why this might be?


    Thanks,

    Nick.

  • OK, but when I reboot, it doesn't actually reboot. It just says "The system is rebooting..." with the green progress line. If I refresh the page, it times out. In the end I pull the plug and then turn it all back on again, it boots into OMV. I guess this is a seperate issue, a problem with reboot and nothing to do with Clonezilla.


    What would this be do you reckon, BIOS setting or something?


    Thanks,

    Nick.

  • OK, me again.


    I have fiddled with the BIOS so that the machine reboots.


    I have also now got the machine next to my Windows computer in the garage, on a KVM switch, so that I can nose at whats happening on the OMV machine. On the web interface, I asked OMV to reboot once to Clonezilla. Looking at OMV using the KVM, that has happened and it shows two options In one of those very basic GUIs:


    Start_Clonezilla Start Clonezilla

    Enter_shell Enter command line prompt


    The web interface is now also unavailable (makes sense)


    So, we are now here in the guide:

    I am using command prompt on Windows (not Putty), and this is what I get:

    Code
    C:\Users\nickd>ssh user@192.168.1.98
    ssh: connect to host 192.168.1.98 port 22: Connection timed out

    When I get back on my Mac, I will post the terminal output from there as I think it's slightly different.


    Edit: OK, Terminal on the Mac says this:

    Code
    Mac-Pro:~ nick$ ssh user@192.168.1.98
    ssh: connect to host 192.168.1.98 port 22: Operation timed out

    Sorry, it was saying something else last night that suggested the user had not been created.


    Cheers,

    Nick.

  • I have fiddled with the BIOS so that the machine reboots.

    That should not be necessary. Just set grub (the boot loader) to boot into Clonezilla like you have done before:

    I have already installed Clonezilla so I went ahead and hit the 'Reboot to Clonezilla Once' button, but it just gives this message:


    "Configuring grub to boot once from Clonezilla iso... 4"

    Then use the drop down menu in OMV in the top right corner of the GUI and select "reboot".

    Then the server should reboot into clonezilla. Then ssh into the server. Note that the IP address might have changed.


    Have you checked which IP address has been assigned by your router?

  • OK, thanks for bearing with me, its probably a bit painful for you!


    Yes, you were exactly right regarding the IP address, I assumed it would keep the static one that OMV uses but, of course, Clonezilla is not to know, I guess. So, I have done the static lease thing at the router and now I get this goodness:

    Well, its all goodness apart from the error that I am getting. I will go and have a read up on this to try to learn to fix it.


    Thanks again,

    Nick.

  • EDIT #2: OK, it looks like I have created the bakup directory on the system disk, rather than the data one! Hang on and let me fix this - its getting there!!

    EDIT #1: Oh hang on - should the backups folder be in /srv or /dev-disk-by-label-storage01?


    OK, so I get this in a terminal:

    Code
    root@openmediavault:~# cd /srv
    root@openmediavault:/srv# ls
    backups dev-disk-by-label-storage01 ftp tftp

    ... and this in mc:



    So, it looks like its there...

  • OK, how do I change drives on the CL or using MC sio that I can create the 'backups' directory on the data drive, this might help you below:

    Code
    root@openmediavault:~# blkid -c /dev/null
    /dev/sda1: UUID="663df730-97f4-478a-bfed-991cd4fedc37" TYPE="ext4" PARTUUID="eed7b833-01"
    /dev/sda5: UUID="1ba2f99b-37d8-4085-8d93-9b55bff81c86" TYPE="swap" PARTUUID="eed7b833-05"
    /dev/sdb1: LABEL="storage01" UUID="878565e5-d5d3-4652-9295-86e9aa9863dc" TYPE="ext4" PARTUUID="73093281-ec80-4ec0-aa70-54854c334d2c"

    I need to create the directory in /srv on the /dev/sdb1: LABEL="storage01" device.


    Thanks!

    Nick.

Participate now!

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