Sync linux and windows folders across networks.

We have rackspace linux server folder that needs to be mirrored to our local network shared windows folder reliably. What are my options ? The source folder has files from over the years that need to be excluded from during syncing. Only the files newly coming into source folder needs to be mirrored.

The linux folder files are too slow for accessing from corp PC and would like to rather have them accessed from a local shared drive. What is the best way to address this ? Can you help?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Justin StearCommented:
Have you thought about using rsync to sync the files?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pritipatel0408Author Commented:
I dont know linux, can you please cite an example script that does the above ?
Justin StearCommented:
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Justin StearCommented:
Do you have support with Rackspace?  They might have a program that already does something like this.
pritipatel0408Author Commented:
I looked at the links you pointed out. Its not clear which flag allows me to specify only newer or amended files need to be mirrored and not a full back up?
pritipatel0408Author Commented:
To elaborate
Lets say my windows destination folder is currently empty and my source linux folder has files 1.pdf, 2.pdf and 3.pdf. I enable rsync between folders. When I copy 4.pdf in the linux folder. The destination should only have 4.pdf. The older files should remain out.
Justin StearCommented:
Rsync will only sync new/modified files.  You can either move the files you don't want sync'd or you will have to pipe commands together to get this to work.

find . -newermt "2015-07-29 15:21:00" -print0 | rsync -vuptn -0 --files-from=- "location"

Open in new window

*n* will do a trial run, before actually doing anything, remove it when you are ready.
pritipatel0408Author Commented:
Great. Will it be like a service that runs does the mirroring in real time? Doing it in real time is important for me. Many thanks!
Justin StearCommented:
How much data changes throughout the day?  There may be better solutions than what you are trying to do.
If you want this to run repetitively you will need to setup a cron job to run an rsync script.
pritipatel0408Author Commented:
The data does not change much. But when a file gets dropped in the source, it should start copying to the destination. it does not have to wait until a set time to start the process.
Justin StearCommented:
Here is a post that shows how to setup cron job every minute.
pritipatel0408Author Commented:
Would this how the behavior be ? Can you please confirm?

Lets say I start the cron job at set to run every 5 mintures

at 3PM
Source : 1.pdf, 2.pdf, 3.pdf
Destination empty

At 3:01 PM I add a file to the 4.pdf
At 3:05 PM  cronjob results in
Source 1.pdf, 2.pdf, 3.pdf, 4.pdf
Destination 4.pdf

At 3:06 PM
I add 5.pdf and 6.pdf

At 3:10PM I have
source: 1.pdf, 2.pdf, 3.pdf,4.pdf,5.pdf,6.pdf
Destination 3.pdf, 4.pdf, 5.pdf

Is that correct?

Can I not use incron to watch the folder? I wont have any sub folders to sync.
Justin StearCommented:
In your example, if you specify to only sync files after 3.pdf, it will never sync 1.pdf 2.pdf or 3.pdf.  it will also sync 6.pdf to the destination.  You can always add more, but it isn't necessary.  I would just experiment on test data and make sure everything works as it is supposed to within your network.  I don't recommend testing on a production server.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.