File compare in multiple files

Hi,

In at Citrix farm all Citrix-servers need to be identical.
Therefore there is one share from which we sync all data on these servers. Now we want to be absolutely sure the content is exactly the same. That's why we're looking for a tool that compares for example:
 \\server1\share\directory
 \\server2\share\directory
 \\server3\share\directory
 \\server4\share\directory
and shows differences if there are between these directories/files (as is possible in a tool like beyond compare).

Can you tell me if there is a tool like this?

Thanks.
E.
exchangeexpertsdelijnAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

LeeeRussellCommented:
Is there a reason you don't want to use Beyond Compare?  As you say this tool would do this?

If you were looking for an open source/free tool that would do this then I would suggest Unison.  It's not as user friendly as beyond compare, but I've had good results when running Unison from a batch file, as it allows you to specify rules for how to sync one location to another.
0
rcflawCommented:
A batch file with "Examdiff.exe" command line may give help.
0
exchangeexpertsdelijnAuthor Commented:
>Is there a reason you don't want to use Beyond Compare?  
Please read the question more carefully, I want to compare more then two directories. Beyond compare can only compare 2.
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

LeeeRussellCommented:
Apologies for the misunderstanding - I thought you wanted to sync all four locations to one master location.

Unfortunately, I do not know of any tool that would do the job you require directly.  My best suggestion would be a script that would sync 2 of the servers at a time until all four servers were identical i.e.:

Sync server1 with servers 2,3 and 4
Sync server2 with 3 and 4
Sync server3 with server4

but I suspect that you have already considered this.
0
exchangeexpertsdelijnAuthor Commented:
> My best suggestion would be a script that would sync 2 of the servers at a time until all four servers >were identical i.e.:
Again, please read the question:

 "there is one share from which we sync all data on these servers. Now we want to be absolutely sure the content is exactly the same. "
0
LeeeRussellCommented:
OK, if I've understood correctly, you need to check that the 4 servers are the same after being sync'd with the "share"?

I don't think that there is software that will compare the four locations simultaneously.  I think you will have to do three comparisons to prove that all the locations are the same.  For example you could compare servers 1 and 2 then 2 and 3, and then 3 and 4.
0
Dave HoweSoftware and Hardware EngineerCommented:
I would suggest rsync or something similar - it will continually compare the hashes at each side of the sync, and replicate any that differ from the "master" copy. There are several ports of rsync that run as a windows service, or it can be run as a scheduled (batch) job.
0
exchangeexpertsdelijnAuthor Commented:
> I don't think that there is software that will compare the four locations simultaneously.  I
There are not 4 server/locations but 11 so this is no option.

>I would suggest rsync or something similar - it will continually compare the hashes at each side of the > sync, and replicate any that differ from the "master" copy.
Not an option, servers sync only when we want them to sync at boot time (defined in configfile).
Continuous sync would sync any change while sometimes we don't want to appy the change immediately + files on those servers which are being synced can be in use.

An option would be a search for errors in each synclog of each server. However a beyond compare of multiple serverfolders would be nicer/faster.
0
LeeeRussellCommented:
What you could do is create a batch script using Beyond compare.  The batch script would compare the 11 folders (i.e. do 10 comparisons).  Beyond compare can run from the command line, and will return a dos ERRORLEVEL depending on what it has found.

It wouldn't be a complicated batch script to check the ERRORLEVEL for the 10 comparisons, report back if all locations are identical, and create a log file if any differences were found.

I think this is as close as you would get to a single solution.
0
exchangeexpertsdelijnAuthor Commented:
Ok, please tell me how to achieve this comparison of multiple folders script-based in Beyond Compare.
0
rcflawCommented:
From my past experience in Citrix servers, try to make use of Windows Server's "DFS Replication" may elminiate the root cause of the problem.
0
LeeeRussellCommented:
OK Apologies for the delayed reply, I didn't notice that you'd responded to this again.

It's not an elegant solution I've got, but it should work.

First, you will have to create a folder compare script within Beyond compare for each of the folder compares you need to do.  In case you don't know a beyond compare script can just be a text file and will have to contain something like:

load "\\server1\share\directory" "\\server2\share\directory"
expand all
folder-report layout:side-by-side options:display-mismatches output-to:"C:\Temp\BYCMP_out_1cmp2.txt"

You will need to create as many of these files as you need to compare each directory.  In the batch file below I have saved the Beyond Compare script as C:\Temp\BYCMP_1cmp2.txt

A batch file can then call Beyond Compare for each of the Beyond Compare scripts you have written:
REM   Call beyond compare and invoke the script written above.

CALL "C:\Program Files\Beyond Compare 3\BCompare.exe" /silent @C:\Temp\BYCMP_1cmp2.txt


REM   After this has completed you need to search each of the 
REM   output text files for either of the strings "<<" or ">>".  
REM   These strings only occur when a difference has been found.
REM   Depending on how much information you require, you can 
REM   either find the first difference and set an errorlevel, or 
REM   output all differences found to a log file and review this 
REM   independently.

REM   Set up a log file

ECHO Error log > C:\temp\BYCMP_log.log

REM  and then search through beyond compare output files for any errors:

FINDSTR "<<" C:\Temp\BYCMP_out_1cmp2.txt >> C:\temp\BYCMP_log.log
FINDSTR ">>" C:\Temp\BYCMP_out_1cmp2.txt >> C:\temp\BYCMP_log.log


REM   If you want an indicator that any errors have been found, 
REM   can now search the log file for any differences found.

FINDSTR "<<" C:\temp\BYCMP_log.log > NUL
IF %ERRORLEVEL% EQ 0 ECHO Differences have been found between directories.

FINDSTR ">>" C:\temp\BYCMP_log.log > NUL
IF %ERRORLEVEL% EQ 0 ECHO Differences have been found between directories.

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Dave HoweSoftware and Hardware EngineerCommented:
I hadn't noticed either :)

RSync doesn't have to be continuous - you can have it as a scheduled job, or call it from a batchfile.

The service mode does it at timed intervals, but clients do it on-demand (and can be command line/scriptable)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.