0

I am using a load balancer in aws and want to sync files in real time. I was trying to do it by rsync but it's not a real time we set it by cron. I want to do it by real time, I am using it in Singapore region and there is no EFS option.

halfer
  • 19,824
  • 17
  • 99
  • 186
  • Why do you want to sync the files? What kind of files are we talking about? If the goal is file storage, why not use S3 with CloudFront? – Bram Jan 14 '17 at 14:03
  • If we are using s3 then it not working in real-time. I want a file system which is work in real time like EFS(amazon) and Gluster. I wan to use it in load balancer. so if some one make any changes then it will reflct in real time or if some one (user) upload file on application it will work fine and reflect on both server – abhaysingh Jan 15 '17 at 03:57

1 Answers1

0

There is a daemon called lsyncd, which does exactly what you need.

You can read further about it here

"rsync is an excellent and versatile backup tool, but it does have one drawback: you have to run it manually when you want to back up your data. Sure, you can use cron to create scheduled backups, but even this solution cannot provide seamless live synchronization. If this is what you want, then you need the lsyncd tool, a command-line utility which uses rsync to synchronize (or rather mirror) local directories with a remote machine in real time. To install lsyncd on your machine, download the latest .tar.gz archive from the project's Web site, unpack it, and use the terminal to switch to the resulted directory. Run then the ./configure command followed by make, and make install (the latter command requires root privileges). lsyncd is rather straightforward in use, as it features just one command and a handful of options"

Ijaz Ahmad
  • 11,198
  • 9
  • 53
  • 73