Backup from Disk 1 to Disk 2

  • HI All


    OMV is a great thing.


    I have installed two disks in my system. Disk 1 (2 TB) and disk 2 (3 TB). On disk 1 I have installed a network share for all clients in my small home network. Disk 2 I have planned only for OMV internal use. I like to have a backup of disk 1 stored on disk 2. Not only a mirroring from disk 1. For often changed Files I like to have different backup versions.


    Is it possible to do this with RSync (how)?
    What is the easiest way to do this?


    Thanks for your help.
    birdy

    • Offizieller Beitrag

    rsync will work for this. I have separate folders to do exactly this. They are named daily 1, daily 2, weekly, monthly, yearly. Daily 1 and 2 are alternated every other day and the others should be self explanatory. This gives me five different possible copies of a file (assuming it is old enough). You could add more daily folders for newer files.


    The rsync command/script runs via cron jobs. The command I use is rsync -avr --delete disk1 disk2/daily1

    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!

  • ryecoaaron thanks for this hint.


    For my understanding you have 5 snapshots from disk1 stored on disk2. Five snapshots from 5 more or less random timestamps. Yes it ist a possibility with advantage and many disadvantages. But this is not my target solution.
    The Space you need on disk2 have to be 5 times bigger than disk1. For a lot of large unchanged files you have 5 Backups (eg. Movie, or Music Library) -> not really needed. For small and often changed files you have only a version from last week, month or year. Versions between goes to the black hole :oops:
    In this save concept, a lot of disk space is used for low data security.


    Thx and regards
    birdy

  • Use rsync with the -b (backup) option :


    rsync -abi --backup-dir=/media/disk-to-backup-to/backup_`date +%F+%T`/ --delete /media/disk-to-backup/ /media/disk-to-backup-to/backup/


    This makes a copy of the directory to and puts deleted/changed files to another directory that is labeled with the date and time the command is run<

  • Zitat von "joris"

    rsync -abi --backup-dir=/media/disk-to-backup-to/backup_`date +%F+%T`/ --delete /media/disk-to-backup/ /media/disk-to-backup-to/backup/


    A good way, it works (almost) as desired. Thanks a lot.


    But there is one problem. The new generated directory is inside the last one. It ends in endless nestings.


    (I tried also rdiff . To make Backups is it really easy. But to do a Restore form an older than the last backup is very very inconvenient :( )

  • I've made my version. It's win-friendly with file-names and the "nesting-thing" is solved! :D


    It's creating a hidden folder like this: ".recycle_2012-12-09_18-06-26"


    Try it...if you like to! No warranty at all! :roll:


    Code
    rsync -abiv --backup-dir=/media/destination/.recycle_`date +%F_%H-%M-%S`/ --delete /media/source/ /media/destination/ --exclude .recycle*

Jetzt mitmachen!

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