1

Setup:
One file server with folders for each project.
One employee working from home that needs the files to be on a local NAS since the connection isn't good enough to work via VPN. So, a few project folders will be copied to the NAS.

The problem is that other employees might work on the file server copy during the day, which means that both the local copy and the NAS copy might be updated.

Each night these files should be synchronized where the following rules apply:

  • If a file has been changed on the local server both not on the NAS, the file should be copied to the NAS
  • If a file has been changed on the NAS but not the local server, the file gets copied from the NAS to the server
  • If a file has been changed on both the server and the NAS the file from the NAS wins, not matter what.

Is there any sync tool with this functionality built in? The NAS has FTP support and the sync will be initiated by the server. Can rsync do this? It's the conflict handling that I'm a bit unsure about how to deal with...

EDIT: Version control is an option, but the very last one...

  • I remember having to write a rexx script under OS/2 that does just this back in my uni days... must be 18 years ago now... – Matt Apr 30 '12 at 22:12
1

While you could probably cobble something together with rsync - I have done so in the past - it sounds like you would probably be better served with a dedicated version control system such as git or subversion.

While these products are mostly geared towards text based files they definitely can be used for binary files as well. One of my previous employers used a git repository for version control of photoshop documents.

  • Ah yes, I've thought about that. The files are binary files so I guess subversion will do there. But they were willing to go quite far to make it automagic. Do you have a link or something with a specific rsync case covering this? – JLe Apr 30 '12 at 22:03
  • Unfortunately not. It was something I had to cobble together a long time ago. – Tim Brigham May 1 '12 at 1:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.