Backup a live system

    • Official Post

    I wanted to backup my omv-extras repo machine while it was running. I was able to back it up and restore to a VM with no problems. So, I tried this with an OMV VM and it works as well. I thought I would post this here first before moving it to the forum. I don't think it needs to be a plugin but I thought it might be handy :)


    Backup - (don't mount the backup drive using web interface unless it will be there when you restore)

    Code
    apt-get clean
    mkdir /media/backup
    mount /dev/sdX1 /media/backup
    rsync -aAXv /* /media/backup/ --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found,/export,/home/ftp}
    dd if=/dev/sda of=/media/backup/grub.dd bs=446 count=1
    dd if=/dev/sda of=/media/backup/grub_parts.dd bs=512 count=1
    blkid > /media/backup/uuids
    umount /media/backup


    Restore (please ask for help in a new thread for restoring - not easy!)

    omv 7.4.9-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.13 | k8s 7.3.1-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


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


    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!

  • Nice!
    You can combine this with rsnapshot to have more restore points without much more space on the backup-medium wasted. With a cron job we have a automatic backup :)
    at least for the folders like /var, /usr, /etc ...

  • I finally managed to backup my system-drive to one of my Data-Drives with rsnapshot. It runs daily, weekly and monthly, so if a file is changed and I want to restore it, I can ;)
    RSnapshot is using hardlinks. The backup from the last 2 days is using ~3,55 GB with 3,5GB used on my system-drive.


    Heres the config (if anyone needs it)


    /etc/rsnapshot.d/systembackup.conf


    and in my /etc/anacrontab

    Code
    # system Backup
    @daily  10      rsnapshot.daily rsnapshot -c /etc/rsnapshot.d/systembackup.conf daily
    @weekly 10      rsnapshot.weekly rsnapshot -c /etc/rsnapshot.d/systembackup.conf weekly
    @ monthly 10    rsnapshot.monthly rsnapshot -c /etc/rsnapshot.d/systembackup.conf monthly
    • Official Post

    I left it in the testing repo because it doesn't have a restore (yet). The commands it uses are very stable (rsync, dd) and shouldn't never hurt a system because they are just copying the files (no writing).

    omv 7.4.9-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.13 | k8s 7.3.1-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


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


    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!

    • Official Post

    The procedure is done. Just have to figure out a way to do it that is easy for noobs.

    omv 7.4.9-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.13 | k8s 7.3.1-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


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


    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!

  • Hi guys!
    Great work....Always nice to have regular backups of the system drive...especially when you are running a Company and time is ...as they say Money....lol
    Looking forward to seeing the plugin...


    bookie56

    • Official Post

    Plugin is in the repo but does not have a restore yet.

    omv 7.4.9-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.13 | k8s 7.3.1-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


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


    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!

    • Official Post

    I wish it helped with restore. Restore difficulty is still the problem with my method/plugin. I would add to your script backing up the mbr and partition table if you want to be able to restore from that backup.

    omv 7.4.9-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.13 | k8s 7.3.1-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


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


    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!

  • Quote from "tekkbebe"

    Clonezilla is better. Only have to restore image.


    1) Restore image.


    Clonezilla is sweet... but requires a system shutdown. But I do periodic clone's (ie, when I remember) and it has saved me for sure.

  • Hi,


    I m looking for this try of backup solution, and i am very new with debian and openmediavault, can someone pls help
    with step by step how to do this backup solution.


    many many thank you for help


    rdg.

    • Official Post

    Just boot clonezilla on your system using a cd or usb stick. It has a step by step menu that is easy to create a backup. It doesn't install anything to your system. Restore is done the same way.

    omv 7.4.9-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.13 | k8s 7.3.1-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


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


    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!

  • Would this kind of (manual) restore work?:


    1. Install same version of OMV with same kernel (original or from backports)
    2. Change uuid, copy files, modify /etc/udev/rules.d/70-persistent-net.rules, reboot

    • Official Post

    The newest version of the backup plugin (for kralizec) lets you install clonezilla and boot to it headlessly. I recommend this method over any other.

    omv 7.4.9-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.13 | k8s 7.3.1-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


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


    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!

Participate now!

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