NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
JasonBMechDev
Apr 12, 2021Follower
How to make RSync jobs not create extra subdirectory
While using RSync jobs, which I understand are supposed to be used between two ReadyNAS machines, I've encountered an annoying problem that I'd like to know if there were some way to fix. This proble...
- Apr 12, 2021
JasonBMechDev wrote:
Let's assume I have a Share on NAS 1 called Folder123, and inside Folder123 there are a lot of important business documents. On NAS 2, I create a Share called Backup_Folder123, and I use an RSync backup job to move the data from NAS 1 to NAS 2. My issue is that, on NAS 2, instead of the data inside of Folder123 being moved into the Backup_Folder123 Share, it is moved into Backup_Folder123\Folder123\.
It sounds like you are running the backup job on NAS 1 (with a remote destination). If you run the backup job on NAS 2 (with a remote source) you'll find this doesn't happen.
However, you can keep the backup job running on NAS 1. You just need to apply step 16 in the guide here: https://kb.netgear.com/29741/How-do-I-back-up-data-between-two-ReadyNAS-OS-6-systems-using-the-backup-manager Note you only do step 16 when the backup is running with a local source. One benefit of running the jobs on NAS 1 is that the NAS will make a snapshot first, and back up the snapshot. So the backup will be coherent, even if someone is changing files on the source share while the backup is running.
As an aside: If I am understanding your use case correctly, you want NAS 2 to be a mirror of NAS 1. If that is the case, you definitely do want to use RSYNC (and not Windows backup). Windows backup will not remove files on NAS 2 when they've been deleted, moved, or renamed on NAS 1. That will result in a lot of clutter on NAS 2 over time.
if you look on the advanced tab of an RSYNC backup job, you'll find a "remove deleted files on target" checkbox. That will ensure that the destination matches the source when the backup completes. You won't find that option for the other backup protocols. If you want to be able to recover deleted files and folders, you can enable snapshots on the destination share (and of course on the source share too).
StephenB
Apr 12, 2021Guru - Experienced User
JasonBMechDev wrote:
Let's assume I have a Share on NAS 1 called Folder123, and inside Folder123 there are a lot of important business documents. On NAS 2, I create a Share called Backup_Folder123, and I use an RSync backup job to move the data from NAS 1 to NAS 2. My issue is that, on NAS 2, instead of the data inside of Folder123 being moved into the Backup_Folder123 Share, it is moved into Backup_Folder123\Folder123\.
It sounds like you are running the backup job on NAS 1 (with a remote destination). If you run the backup job on NAS 2 (with a remote source) you'll find this doesn't happen.
However, you can keep the backup job running on NAS 1. You just need to apply step 16 in the guide here: https://kb.netgear.com/29741/How-do-I-back-up-data-between-two-ReadyNAS-OS-6-systems-using-the-backup-manager Note you only do step 16 when the backup is running with a local source. One benefit of running the jobs on NAS 1 is that the NAS will make a snapshot first, and back up the snapshot. So the backup will be coherent, even if someone is changing files on the source share while the backup is running.
As an aside: If I am understanding your use case correctly, you want NAS 2 to be a mirror of NAS 1. If that is the case, you definitely do want to use RSYNC (and not Windows backup). Windows backup will not remove files on NAS 2 when they've been deleted, moved, or renamed on NAS 1. That will result in a lot of clutter on NAS 2 over time.
if you look on the advanced tab of an RSYNC backup job, you'll find a "remove deleted files on target" checkbox. That will ensure that the destination matches the source when the backup completes. You won't find that option for the other backup protocols. If you want to be able to recover deleted files and folders, you can enable snapshots on the destination share (and of course on the source share too).
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!