I'm looking for recommendations on automated folder synchronization tools to keep the content in our three environments synchronized automatically.
Specifically, we have several applications where a user can upload content (via a File Upload page or a similar mechanism), such as images, pdf files, word documents, etc. In the past, we had the user doing this to our live server, and as a result, our test and staging servers had to be manually synchronized.
Going forward, we will have them upload content to the staging server, and we would like some software to automatically copy the files off to the test and live servers EITHER on a scheduled basis OR as the files get uploaded.
I was planning on writing my own component, and either set it up as a scheduled task, or use a FileSystemWatcher, but it occurred to me that this has probably already been done, and I might be better off with some sort of synchronization tool that already exists.
On our web site, there are a limited number of folders that we want to keep synchronized. In these folders, it is an all or nothing - we want to make sure the folders are EXACT duplicates. This should make it fairly straightforward, and I would think that any software that can synchronize folders would be OK, except that we also would like the software to log changes. (This rules out simple BATCH files.)
So I'm curious, if you have a similar environment, how did you solve the challenge of keeping everything synchronized. Are you aware of a tool that is reliable, and will meet our needs? If not, do you hav开发者_C百科e a recommendation for something that will come close, or better yet, an open source solution where we can get the code and modify it as needed? (preferably .NET).
Added
Also, I DID google this first, but there are so many options, I am interested mostly in knowing what actually works well vs what they SAY works, which is why I'm asking here.
Added More
I forgot to specify that these are Windows servers. (Windows Server 2003 to be exact) Sorry.
If you want to do it on a scheduled basis, I've used SyncBackSE to do that - it will synchronize multiple folders (or FTP sites) either direction, and might be what you're looking for. However, it's a scheduled task, and I don't believe it can be started on demand (though maybe the Pro version supports that).
On linux, the tool rsync is the best one available.
unison is a good synchronization tool, but only supports two replicas per run. To synchronize three sites, you'd have to do A<->B, B<->C, A<->C.
I'd suggest using git. Make a repo at each site and automate using git-add
, git-rm
, and git-commit
to commit at each repo the current state of the environment. The automatically push and pull between the repos as you want synchronization to happen.
精彩评论