Best daemon/program for keeping directories synchronised?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Best daemon/program for keeping directories synchronised?
Hello!
The goal is simple: have /home/user/directoryONE always synced with /home/user/directoryTWO with an interval around 10 seconds. Keep in mind though that there are a lot of subdirectories and files in directoryONE, so some kind of caching would be nice.
rsync ?
It figures out the diffs between src & target and only txfrs diffs, so after the initial copy (which you could just use cp for), its pretty quick unless you change a LOT of stuff quickly.
rsync ?
It figures out the diffs between src & target and only txfrs diffs, so after the initial copy (which you could just use cp for), its pretty quick unless you change a LOT of stuff quickly.
Though rsync may be part of a solution, it's not a whole solution.
Though rsync may be part of a solution, it's not a whole solution.
That's correct. But it is not the complete solution, because you didn't tell us what the complete problem was.
You had already figured out your "solution" and asked us how to implement it.
Maybe if you told us why you need to sync two directories with an interval of ~10sec. And what kind / amount of data we're talking about. And how often this data changes.
Maybe then we could help you to find a complete solution.
I second the recommendation by whizje. Use lsyncd. I use it in a server environment to keep 3 servers in sync. It uses inotify to watch for new/changed inodes and then fires off rsync to copy those over. If I remember right, it has about a 15 second lag, but it should be pretty close to what you need.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.