Hi there
We have been using BC2 and BC3 for a while now and this has been a wonderful tool in our daily admin work.
We have about 100 servers and we do server compares everyday and this takes about 30 mins to do the job.
I have read up on BC help section before writing this question. So i shall explain this in detail
We use batch file to do our BC.
The first batch file is called SERVERCOMPARE.bat
The contents of this is as follows
There are multiple batch files which duplicates the above batch file contents to cater for 100 servers but i have not included them here but contents are similar.
The second batch file is called Servers-Set1.bat
The contents of this is as follows
There are extra batch files which duplicates the above batch file contents to cater for 100 servers but i have not included them here but contents are similar.
The third batch file is called FoldersCompare.bat.
The contents of this is as follows
The fourth batch file is called BC.bat.
The contents of this is as follows
Lastly, BCScript.txt has the following contents
This is my version. The backup version works fine like i said but takes 30 mins.
The above version of mine works fine and takes only 3 mins to do the compare
My main question is my version compares all the folders but doesn't report any mismatches on some of them. To explain this, in the FoldersCompare.bat, only the folders which are bolded in the below code reports mismatches but not all of them. I have tested this by creating orphans on some servers for those folders which do not provide mismatches. If i change the criteria in the BCScript.txt to binary or CRC, it reports mismatches all the folders mentioned below but takes longer then the backed version. The backed version also has the criteria set to size only but this reports mismatches on all the folders of their respective servers. The only difference between the backed up and my version is the BCscript.txt. You can find the contents of the BCscript.txt from the backed up version below after the FoldersCompare.bat
Please suggest/help
FoldersCompare.bat
The contents of this is as follows
BCScript.txt from the backedup version
We have been using BC2 and BC3 for a while now and this has been a wonderful tool in our daily admin work.
We have about 100 servers and we do server compares everyday and this takes about 30 mins to do the job.
I have read up on BC help section before writing this question. So i shall explain this in detail
We use batch file to do our BC.
The first batch file is called SERVERCOMPARE.bat
The contents of this is as follows
Code:
del /Q "C:\BC\BusinessLogic\Reports\*.txt" start C:\BC\BusinessLogic\Servers-Set1.bat
The second batch file is called Servers-Set1.bat
The contents of this is as follows
Code:
call C:\BC\BusinessLogic\FoldersCompare.bat server1 server2
The third batch file is called FoldersCompare.bat.
The contents of this is as follows
Code:
del /Q "C:\BC\BusinessLogic\Reports\*%1*%2*.txt" call C:\BC\BusinessLogic\BC.bat %1 "\c$\folder1\subfolder1" %2 "\c$\folder1\subfolder1" ren C:\BC\BusinessLogic\Reports\BC-report.txt subfolder1-%1-%2.txt call C:\BC\BusinessLogic\BC.bat %1 "\g$\folder1\subfolder2" %2 "\g$\folder1\subfolder2" ren C:\BC\BusinessLogic\Reports\BC-report.txt subfolder2-%1-%2.txt call C:\BC\BusinessLogic\BC.bat %1 "\h$\folder1\subfolder3" %2 "\h$\folders1\subfolder3" ren C:\BC\BusinessLogic\Reports\BC-report.txt subfolder3-%1-%2.txt
The contents of this is as follows
Code:
echo off del /Q "C:\BC\BusinessLogic\Reports\BC-report.txt" echo off "C:\Program Files\Beyond Compare 2\BC2.exe" @"C:\BC\BusinessLogic\BCScript.txt" "\\"%1%2 "\\"%3%4
Code:
log verbose append:C:\BC\BusinessLogic\Reports\verboselog-report.txt filter "-\Cache\;-PCAPI.log;-Serialisers.Cfg;-DB*.*;-*.backup;-*testing*.dll;-\Stage\;-\v2.0.5.232\;-dripplier.exe;-\Pictures\" criteria size compare binary load %1 %2 expand all select all folder-report layout:side-by-side options:column-size,column-timestamp,column-crc,display-mismatches & output-to:C:\BC\BusinessLogic\Reports\BC-report.txt
The above version of mine works fine and takes only 3 mins to do the compare
My main question is my version compares all the folders but doesn't report any mismatches on some of them. To explain this, in the FoldersCompare.bat, only the folders which are bolded in the below code reports mismatches but not all of them. I have tested this by creating orphans on some servers for those folders which do not provide mismatches. If i change the criteria in the BCScript.txt to binary or CRC, it reports mismatches all the folders mentioned below but takes longer then the backed version. The backed version also has the criteria set to size only but this reports mismatches on all the folders of their respective servers. The only difference between the backed up and my version is the BCscript.txt. You can find the contents of the BCscript.txt from the backed up version below after the FoldersCompare.bat
Please suggest/help
FoldersCompare.bat
The contents of this is as follows
Code:
del /Q "C:\BC\BusinessLogic\Reports\*%1*%2*.txt" [B]call C:\BC\BusinessLogic\BC.bat %1 "\c$\folder1\subfolder1" %2 "\c$\folder1\subfolder1" ren C:\BC\BusinessLogic\Reports\BC-report.txt subfolder1-%1-%2.txt[/B] call C:\BC\BusinessLogic\BC.bat %1 "\g$\folder1\subfolder2" %2 "\g$\folder1\subfolder2" ren C:\BC\BusinessLogic\Reports\BC-report.txt subfolder2-%1-%2.txt call C:\BC\BusinessLogic\BC.bat %1 "\h$\folder1\subfolder3" %2 "\h$\folders1\subfolder3" ren C:\BC\BusinessLogic\Reports\BC-report.txt subfolder3-%1-%2.txt
Code:
load %1 %2 log verbose append:C:\BC\BusinessLogic\Reports\verboselog-report.txt filter "-\Cache\;-PCAPI.log;-Serialisers.Cfg;-DB*.*;-*.backup;-*testing*.dll;-\Stage\;-\v2.0.5.232\;-dripplier.exe;-\Pictures\" expand all select all criteria size compare binary folder-report layout:side-by-side options:column-size,column-timestamp,column-crc,display-mismatches & output-to:C:\BC\BusinessLogic\Reports\BC-report.txt
Comment