Back up of system and data options

  • Apologies for the lengthy question / first post. I am just about to set up my first OMV system on a G4560 with 8gb RAM and 3x3tb HDD for storage and a small 120gb m.2 drive for OS and I had a question about back ups.


    I would like to be able to back up both the OS drive and data drives and would like to know the best and if possible simplest solution to do this. I have had a read through the forums and have seen many suggestions for both these topics. I do not think a RAID setup is necessary for my use case so will probably keep the drives separate.


    From my research the best way to back up the OS drive is to use clonezilla. Please correct me if this is incorrect?


    The data drives seem to have multiple solutions, rsync, usbbackup, clonezilla, external/internal drives and to be honest I am bit lost as to what the most suitable option is for me. Bearing in mind I am a new to OMV.


    The storage will be used for photos, videos, audio and some documents, your general household stuff. Nothing life or death but things that I would be upset to lose.


    I am happy to use one of the internal drives for back up and possibly an external drive as a third option less regularly to follow the 3-2-1 rule. I could also use a raspberry pi to setup a 2nd OMV system and use that as a backup point but would rather this be the last option unless there is a good argument for this being the best option given the above.


    My main concern obviously is not losing the data on a drive should one fail, but bonus points for ease of use and ease of setting the system back up again should the worst happen.


    Any and all advice or opinions welcome! ?(

    • Offizieller Beitrag

    For OS drive I think clonezilla is the best.


    For the data drives

    • rsnapshot to make an internal backup of the data from one data drive to another in the same server (advantage of rsnapshot is the creation of snapshots - you can go back in time and restore previous versions of a file)
    • rsync to backup to a second server (the second server could be in your house or, even better, at a friend or relatives)
    • duplicati to backup to online sever (pCloud, backblaze etc) - alternative to a second server outside your house
    • Offizieller Beitrag

    My preference for data drives is rsync. Depending on the amount of data involved and how you have things laid out across your 3 drives... You could also use rsync to backup internally... Just set up a local rsync job.


    Technodad just did a good video on using rsync. Look in for his thread in the Guides forum and it's the last post in that thread.


    For me (I have a similar set up to you). I have all of my data on "Drive A". That drive is what I use for all my services, regularly add/remove data to it, etc. I then set up a simple rsync job that runs 2-3x a day and sync's "Drive A" to another internal drive ("Drive B").


    OS Drive is another matter... I don't back up my OS drive and in the event something happens there.. I'll just clean install and set everything up again.. That solution is not for everyone, but I've installed Linux and OMV enough, installing is not something I'm concerned about.

    • Offizieller Beitrag

    The main reason for backing up the rootfs, for me, is that I'm experimenting. And I save some time by have the rootfs backed up when something goes wrong with the OMV install.
    I'm not really very concerned about the rootfs becoming corrupted during normal use. I just reinstall and carry on. Still, I have backups. Just cloned images of the SD cards for my HC2s on my laptop. Quick and easy to do.

  • My preference for data drives is rsync.

    Thanks for your response. So rsync does scheduled sync jobs that just copies over the differences between data sets rather than copying everything each time if my understanding is correct.


    I seem to remember reading in my research that a criticism of this was that if there was any corruption in your origin data then this would then be transferred over to your backup data as well essentially ruining both. How likely this is I'm not sure?


    Would this be where rsnapshot would have an advantage as you could rollback to a snapshot prior to any corruption of data?


    Also with rsnapshot I am assuming this is similar to a disk image type file that could then be written to a new drive to restore the data? Is this an easy process? and is there any size benefits over the 1-1 copy that rsync does e.g. do snapshot files take less space?


    I have not set anything up or put any data on my system yet and would like to figure out the best way for me to do it before I consolidate everything.

    • Offizieller Beitrag

    If the data is corrupt.. then it will likely detect it as a second copy (because it will not exactly match the copy to compare).. so it will make another copy of the file.


    Example, as this one has happened to me with my keepass database when I back it up on my nas (now days I put it on Google drive..)


    I put the keepass file on my "Drive A", at some point, it gets sync'd to "Drive B"


    A few weeks later I change a bunch of passwords, so I delete my old keepass file on "Drive A".. and put the new one there. A few hours later my sync job runs. It will compare my new keepass file with the "old" one that is still on "Drive B".. since they are different, but have the same name.. it will make the new one "keepass(1)".. so I'll have both files on my backup drive.


    At some point I'll enable the delete function in rsync (I leave it off by default)... And when I run the job... It will bring everything in sync (delete copies, etc )


    Hope that makes sense.

    • Offizieller Beitrag

    Rsync can be used to create versioned timestamped snapshots. That is how I use rsync. Each snapshot looks exactly like a full copy of the original folder tree as it was when the snapshot was created. But instead of copying over unchanged files rsync instead creates hardlinks from the previous snapshot. That means that each snapshot consists mainly of folders and hardlinks and some few new or updated files since last snapshot. The hardlinks takes up very little space, so you can keep many snapshots.


    There is no difference between a file and a hardlink to a file, except that each time a hardlink is created the copy count for the physical data is increased. A file entry is only a "pointer" to physical data on the drive. The hardlink is a feature of some filesystems that allows for several file entries to point at the same physical data on the drive. When a file is deleted the copy count is decreased. Only when the copy count reach 0 is the space used by the physical data for the file reclaimed.


    To use the versioned snapshot facility you need to use special switches with rsync and specify what folder should be used for candidates for hardlinking Typically this means that you write a script that in turn use rsync to create versioned snapshots. Or use some software that in turn use rsync, like rsnapshot.


    Here is an example of how it can look. I use the folder test to store snapshots of the folders dev and download. Inside each folder are timestamped subfolders for each snapshot. And the snapshots only store hardlinks and changed files, but each snapshot looks like full copies. And then you can add some purge functionality that deletes old snapshots accordning to some rules.


    • Offizieller Beitrag

    Before you finally setup your system, take some time to play around. Check different scenarios and solutions until you feel comfortable.


    After you have set up your system, you can install OMV in a virtual machine to test things you want to change before changing them on the productive system.

Jetzt mitmachen!

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