× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Re: 2-way rsync?

julesg1
Tutor

2-way rsync?

I have a new RD314 and an older NV+ NAS. I want to use the older NV+ as a remote backup NAS and use Rsync to accomplish this. However Rsync seems to work only in 1 direction. Is it possible to make this work in both directions?
Message 1 of 15
mdgm-ntgr
NETGEAR Employee Retired

Re: 2-way rsync?

Rsync is one way.

For bi-directional syncing you would need to use something else.

If you want to backup share A on NAS A to share A on NAS B and share B on NAS B to share B on NAS A you could do this using two separate backup jobs that use Rsync.
Message 2 of 15
WarrenT
Tutor

Re: 2-way rsync?

Hi, please clarify for me:
I would like only one way syncing using RSYNC or REPLICATE. From a new RN312 (OS6 which includes RSYNC) to an older Duo (which does not have RSYNC included). I wish to sync (once a day, after hours) the 10 Shares on my RN312 to the older Duo. I do not require any syncing from old Duo to the RN312. ie this is a one way process most times. Only if I must restore back from Duo to RN312, will I need a 'reverse' flow
Will this be possible? I do not wish to purchase a separate REPLICATE licence for the older Duo.
Thanks
Message 3 of 15
TeknoJnky
Hero

Re: 2-way rsync?

if you have a sparc based duo, firmware 4.x, then it does not support replicate.

if both devices are on the same network, then rsync backup jobs should work fine, simply create an appropriate backup job.

to restore from the duo to the rn312, you would need to either reverse the existing backup jobs (swap source/destination) or create additional backup job(s) to pull the data from the duo to the rn12.
Message 4 of 15
WarrenT
Tutor

Re: 2-way rsync?

Hi, and thanks. The Duo is Sparc based with RAIDiator 4.1.13 and I do not plan to buy a separate REPLICATE licence for the old Duo.
However, it IS on the SAME LAN, so I interpret your comment to say that RSYNC (one way) backup from new RN312 (OS6) to old Duo (Sparc) will be able to work. Is that correct?
Many thanks
Message 5 of 15
StephenB
Guru

Re: 2-way rsync?

You really only want one-way sync, with the ability to restore the source if it is damaged. Two-way sync would only be needed if you were using both NAS as primary storage, and wanted changes to either to be reflected on the other.

It is easy to reverse source/destination of the backup jobs.

Rsync from the RN312 to the Duo will work fine. (You can run the backup jobs from either NAS).
Message 6 of 15
WarrenT
Tutor

Re: 2-way rsync?

Hi Stephen,
Many thanks for that prompt advice.
Message 7 of 15
max_kublin
Tutor

Re: 2-way rsync?

rsync works in both directions.
the command takes a "source" and a "destination".
to change the direction, just exchange source and Destination
I am using root SSH to my Readynas Pro6 and have written a small Shell script that does a bi-directional sync to another Readynas Pro6
This procedure does not require a replicate license.
Currently, I am syncing "manually" by running my script, but this could also be fully automated as a "cron job".
The key to the solution is "enable root SSH" - and a bit of knowhow of the LINUX running on the Readynas.

Regards,

Max
Message 8 of 15
StephenB
Guru

Re: 2-way rsync?

max_kublin wrote:
..rsync works in both directions...
Yes, but that is not enough to create 2-way sync.
For instance, if user-a deletes a file on NAS-a, then that deletion only gets propagated to NAS-b if the NAS-a->NAS-b rsync runs first. If the NAS-b->NAS-a job runs first, then the deletion is undone.

Then of course there is the case when user-a updates a file on NAS-a, and user-b updates the same file on NAS-b (but differently).

If you have a script that does a true 2-way sync, it would be good to share it.
Message 9 of 15
xeltros
Apprentice

Re: 2-way rsync?

Think of rsync like a process that erases everything in the destination and copies what's specified on the source to a destination folder, depending when it's executed you can't be sure of the results if you use several jobs for that. It's not that way Rsync works but the result is the same. However what you want to achieve is not a 2way sync but two different one way backups. One to save every day, and one to restore if you get a crash. This is possible with Rsync quite easily.
Rsync can be used to a folder and doesn't require an rsync server, which means that if your older NAS hasn't an Rsync server nor client, you can always mount an smb share and rsync to it from the 312 (just reverse source and destination to restore), I would advise some scripting to check if everything worked fine though. This method requires SSH access which may or may not be supported by Netgear (they say they don't support it, but I think that disclaimer is only when you do really bad stuff).
That said, the 312 can backup to an SMB share using timestamps of files and folders, that would require a modified file to be uploaded in full each time but if you do it by night this could be good enough and it's supported by GUI.
Message 10 of 15
StephenB
Guru

Re: 2-way rsync?

I agree that it is often useful to set up 1-way backups with rsync (and other protocols). If you have some control over user behavior at both ends, you can also use these backup jobs to keep two folders in sync. Though this is not a true bi-directional sync, and if you aren't very careful it will not give you the results you want.
Message 11 of 15
xeltros
Apprentice

Re: 2-way rsync?

My way of thinking was one automated backup job and one manually triggered one if source device fails, in other words basic backup/restore process done with Rsync. The tip was just that Rsync can be used to a folder and then you can mount an SMB share that would appear like a folder to Rsync and so you can do everything having only SMB access to one device and full SSH access to the other so that the inability of the older device to have rsync is no problem neither for backup nor for restore.

That said I didn't pay attention that post #1 and #3 weren't sent by the same person.
So what I said was for @WarrenT.

For true bidirectional sync, DRBD is the first thing to pop in mind but I fear that with NAS custom kernels that's a bit complicated (if possible) to do.
Second one is Bittorent sync, if you have a secure channel between devices of course but I don't think the duo has it in the apps, shouldn't be hard to install it via SSH though. Also I recently found my conf erased while upgrading, I don't think that's the app but that it has more to do with Netgear Package (when my mac updated the app settings remained). Data is still present though, so that's more a trouble of generating keys and getting them back than anything else.
and a third one could be Unison but I didn't use it myself.
Message 12 of 15
StephenB
Guru

Re: 2-way rsync?

xeltros wrote:
...what I said was for @WarrenT...
And I agree that two 1-way backup jobs would solve his issue - I gave him similar advice further up the thread.

xeltros wrote:
For true bidirectional sync, DRBD is the first thing to pop in mind but I fear that with NAS custom kernels that's a bit complicated (if possible) to do.
Second one is Bittorent sync, if you have a secure channel between devices of course but I don't think the duo has it in the apps, shouldn't be hard to install it via SSH though. Also I recently found my conf erased while upgrading, I don't think that's the app but that it has more to do with Netgear Package (when my mac updated the app settings remained). Data is still present though, so that's more a trouble of generating keys and getting them back than anything else.
and a third one could be Unison but I didn't use it myself.
Another possibility is to do a sync directly between your client devices, and just use the NAS for backing up the synced folder.

This application has been on my "to-do" list for a while, but hasn't reached the top yet. I suspect other posters are ahead of me - it would be nice to hear what you all are using .
Message 13 of 15
xeltros
Apprentice

Re: 2-way rsync?

You mean using a tool (usually provided with hard drives) to sync two client devices (keeping a full copy on each) and backing up on of them to the NAS ? Seems like you have a single point of failure there with the device that plays the middle man.

Which application in on your to do ? DRBD ? It's on mine too but vmware ESX solves a lot of clustering problems so I hadn't any good reason to try 😉
Message 14 of 15
StephenB
Guru

Re: 2-way rsync?

I have two laptops (used for different employers), but would like to have some data sync'd between them. Both are backed up using image backup. Security is a concern for the unsynced data, so I'd need to assess whether non-synced data could leak.
Message 15 of 15
Top Contributors
Discussion stats
  • 14 replies
  • 4986 views
  • 0 kudos
  • 7 in conversation
Announcements