Backing up from one HD to another on the same NAS

  • Hello,

    Here's my question:

    I have HD that I share on smb and another HD that I share on ftp. I would like to make a copy of one to the other once a day.

    I had thus set up a command to be repeated which allowed me to make a copy by changing the rights and the owner which was this one:

    Code
    cp -a /srv/dev-disk-by-label-LOCAL/SHARE_LOCAL/* /srv/dev-disk-by-label-EXT/SHARE_EXT; chown -R :adm /srv/dev-disk-by-label-EXT/SHARE_EXT/*; chmod -R 775 /srv/dev-disk-by-label-EXT/SHARE_EXT/*


    and vice versa to make the copy the other way around.


    But I feel like when there's too much data to transfer it doesn't transfer everything.


    I had thought of using rsync associated with crontab to make the backup but my 2 HD are on the same NAS so I think it's not very useful.


    I'm coming to you to see if there is another method to make a recursive copy from one HD to another on the same NAS.


    Thanks you for your help :/

  • Use rsync. Even if the sync / copy is local rsync works perfectly fine. But significantly faster than over the network.


    You might consider setting up a system with versioned daily snapshots? Using rsync for snapshots with hardlinks makes it possible to save many versions of the same filesystem effeciently, since unchanged files between snapshots are stored only once.


    I use rsync in a script to create (and delete) rsync snapshots. I think the plugin rsnapshot do something similar.


    https://github.com/WikiBox/snapshot.sh

    Be smart - be lazy. Clone your rootfs. This help is Grateful™.
    OMV 4: 9 x Odroid HC2 + 1 x Odroid HC1 + 1 x Raspberry Pi 4

  • I use the Rsync command found below in my signature, set up in the Scheduled Jobs tab and set it to run weekly. Read about it starting on page 59 in Getting Started with Openmediavault 5

    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.

Participate now!

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