Questions tagged [lsyncd]

For use with the `lsyncd` file-synchronization tool.

lsyncd is a tool that uses inotify events to trigger rsync. It can be used to keep a remote directory synchronized with local changes. Home page.

29 questions
61
votes
6 answers

What is a reasonable amount of inotify watches with Linux?

I am working on a daemon that monitors file events via inotify to trigger various types of events when files are accessed. I have read that watches are a little expensive, because the Kernel is storing the full path name of every file being…
Tim Post
  • 33,371
  • 15
  • 110
  • 174
12
votes
4 answers

lsync configuration for using non-root logins

I have searched for > 5 days, tried numerous tricks and tips and even tried to get the author of lsync to help but all in vain. I have 2 Red Hat 6.3 web servers that need to sync up their image directories when an image is uploaded. We can't…
freshpowder
  • 121
  • 1
  • 1
  • 5
4
votes
1 answer

Preserving ownership of file with Lsyncd

I have two servers: source-server and target-server. I want use lsyncd to sync files in a directory on source-server to another directory on target-server. In my ssh daemon, on both servers, I have root logins disabled (PermitRootLogin no) so I…
Hal50000
  • 639
  • 1
  • 6
  • 16
3
votes
1 answer

lsyncd: Can't run sync with rsync chown option

Whats incorrect about this syntax? it wont let me run the sync.. settings = { logfile = "/var/log/lsyncd/lsyncd.log", statusFile = "/var/log/lsyncd/lsyncd.status" }, sync { default.rsync, source = "/home/path1", target =…
josias
  • 1,326
  • 1
  • 12
  • 39
2
votes
3 answers

Minikube Mount: bad file descriptor

When I mount a directory in Minikube and list out the directory, I get the errors below: ls: cannot access '/mnt/nilla/assets': Bad file descriptor ls: cannot access '/mnt/nilla/lib': Bad file descriptor ls: cannot access '/mnt/nilla/priv': Bad file…
JoeS
  • 41
  • 5
2
votes
1 answer

lsyncd - OVERFLOW in event queue - Solution is to tune fs.inotify.max_queued_events

lsyncd is a fantastic alternative to NFS or NAS for replicating files among your Linux hosts. I have found the daemon works well with large Linux filesystems (many files, small to large sizes, xfs, ext4, luks) but requires some sysctl tuning as…
Taylor Brockman
  • 179
  • 1
  • 10
2
votes
1 answer

How exactly does Cargo detect file changes?

tl;dr: I want to know what cargo uses to determine whether or not a file has changed to debug a problem I've observed in my build system setup. Description I currently have lsyncd setup to mirror project files onto a remote linux machine where I…
user
  • 4,920
  • 3
  • 25
  • 38
2
votes
1 answer

using supervisord to run lsyncd script

I'm trying to run my lsynd's script with supervisord in order to have it always run. I've coded this conf for my supervisor [program:autostart_lsyncd] command=bash -c "lsyncd…
Claudio Pomo
  • 2,392
  • 7
  • 42
  • 71
2
votes
1 answer

lsyncd cant use dynamic backup suffix

I wan't to use lsyncd to create backups of the modified files using as a suffix a date/time string. If I set the suffix option (in the lsyncd.conf file) using lua, the date/time is computed once, when I start the daemon, and is not updated at each…
2
votes
2 answers

lsyncd doesn't respect ssh user when deleting files

We have setup lsyncd to sync data between two hosts. The ssh connection is configured to use user tomcat with the matching id_rsa identity file. For some reason a append/create on the remote works fine, but deleting doesn't work. When rsync tries to…
JohanKees
  • 669
  • 1
  • 12
  • 22
1
vote
1 answer

Dynamic exclusion list in lsyncd

Our cloud platform is powered by opennebula. So we have two instances of the frontend in "cold swap". We use lsyncd daemon trying to keep instances in datastores synced, but there are some points: we don't want to sync VM's images that have an…
1
vote
1 answer

Force lsyncd to sybc NOW

I'm using lsyncd to mirror a local development directory structure with a remote server. I'm editing files locally (with pycharm) and wait for them to be pushed unto the server when I'm done with a given change. Is there a way to force the lsyncd…
Ben Shomer
  • 36
  • 4
1
vote
1 answer

Linux: Syncing mulitple folders on multiple servers with lsyncd

I have lsyncd running on my main server, to sync files on all servers. But when I add another folder to be synced, the service won't start again. I can't seem to find any errors in logs. I'm no Lua expert, so might be something obvious I'm…
TheNish
  • 330
  • 3
  • 15
1
vote
2 answers

Why is getenv ("HOME") equal to nil in lsyncd.conf?

I am trying to configure lsyncd to synchronize a folder on the home page of the logged user but when I try to capture the value of his $HOME with os.getenv("HOME") the result is always Error prepare /etc/lsyncd/lsyncd.conf.lua:…
kemosade
  • 21
  • 3
1
vote
1 answer

How to get Lsyncd's file-watching capability with Unison's two-way sync?

I have used Lsyncd before, but it just works for one-way sync, so only the Master can copy files to the Slave server. I have found another solution for two-way sync between Master and Slave with Unison, but Unison doesn't watch for changes in…
1
2