Synchronize Frequently Updated Web Servers


Recommended Posts

Hi,

 

I'm currently using csync2 + lsyncd to keep a few webservers synchronized. The way this works is that lsyncd keeps track of events on the filesystem, and invokes csync2 (rsync variant) to cascade changes to other servers. Even though this works fairly well, I'm curious as to whether BitTorrent Sync would be a better fit.

 

However, I've got a couple of questions which I can't figure out for BT Sync:

 

(1) When synchronizing directories and files between systems, how does BT Sync handle ownership and permissions?

(2) If a file is changed on node A and also on node B, how does BT Sync handle conflicts?

(3) Have I understood it correctly when I say that BT Sync operates more in a "star"-like fashion than in a "circle"-like fashion, meaning that system A may sync to system B and C, and B subsequently updates D and C updates E and F?

 

Looking forward to anyone's insight on this.

Link to comment
Share on other sites

@sbrattla

1) Win&Mac: BTSync runs as current user, so all files it creates when syncing have default permissions for current user. Linux - it applies umask to newly created files.

2) Indeed. Last change (including direct copy of an older file to sync directory) wins.

3) It targets to be a mesh structure, i.e. by default all peers try to connect to all peers.

Link to comment
Share on other sites

@RomanZ

Ad. 1 : does this mean that it is not capable of applying ownership + permissions as it was on the originating system?

 

 

Actually You can do it by crontab every minute (for example):

chown -R nobody:nobody /sync_path/chmod -R g=u /sync_path/
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.