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 :/

    • Offizieller Beitrag

    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

    • Offizieller Beitrag

    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

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

Jetzt mitmachen!

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