Subset of directories on multiple servers

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nja10331
    Visitor
    • Apr 2005
    • 3

    Subset of directories on multiple servers

    I am unsure if there is an easy way to do this...

    We have multiple servers with a share on it. The share contains about 10,000 subdirectories. I need to compare about 375 of those directory tress across six of the servers. I do not want to sync the directories, only get a report if they are out of sync.

    Is there an easy way to script this?

    Thanks!
    - Neal
  • chrroe
    Pooh-Bah
    • Oct 2007
    • 588

    #2
    Re: Subset of directories on multiple servers

    Hi Neal!

    It might be possible, but not in an easy way.
    The main problem is to tell BC which folders to compare. If you manage this in the GUI then you should be able to script the task.

    Two solutions came in my mind:

    1. Make use of the filter command. Read the Scripting reference in the BC helpfile to learn more about it. As far as I understand you can use only one filter command, so you would have to declare all desired directories in one line in the script.
    I havn't tried out whether it works, but it's worth a try ...

    2. Use the snapshot facility of BC
    First copy all desired files and folders to a separate directory. Then save a snapshot of this dir.
    Now you can compare this snapshot against the servers. You will have to do some fine-tuning concerning the treatment of orphaned files and folders.


    Anything helpful for you?
    If you need further help feel free to continue this thread


    Bye
    Christoph

    Comment

    • nja10331
      Visitor
      • Apr 2005
      • 3

      #3
      Re: Subset of directories on multiple servers

      I was afraid of that...

      This is what I would up doing:

      Code:
        
      #Turn Logging On
      #log normal append:"c:\BC2\BC2Normal_Slave1.log"
      log verbose append:"c:\BC2\BC2Verbose_Slave1.log"
      #
      # Load the default session
      load <default>
      #
      #Set comparison criteria
      criteria crc
      #
      # Load the base folders and generate report for xx
      load "\\Master\INSTALL$\xx" "\\slave1\INSTALL$\xx"
      expand all
      folder-report layout:summary output-to:"C:\BC2\BC2_Folder_Summary_Slave1_xx.log"
      #folder-report layout:side-by-side output-to:"C:\BC2\BC2_Folder_SideBySide_Slave1_xx.log"
      With the last section repeated for each directory on each server. Ugly.

      For the wish list - variables, loops, appended log files

      Thanks for the help - let me know if you see a way to improve this.

      Comment

      • Chris
        Team Scooter
        • Oct 2007
        • 5538

        #4
        Re: Subset of directories on multiple servers

        Instead of a separate report for each directory on each server, you can generate 1 report for each pair of servers, and use the filter command to only include the folders that you're interested in.

        In your post you said you only needed to filter a subset of folders contained in the loaded base folder. To do that, use the filter command, with the syntax:
        Code:
        filter ".\folder1\;.\folder2\"
        To only compare folder1 and folder2.

        For a long list of folders to filter, you can also make the list go across multiple lines by using the & character.

        Code:
        filter ".\folder1\; &
        .\folder2\; &
        .\folder3\"
        To eliminated folders from the display, use
        Code:
        filter "-.\folder1\;-.\folder2\"
        Right now BC only supports 2 way comparison, so you will have a generate a separate report for each pair of servers.

        Adding a report option to append to an existing report is on our wish list.
        Chris K Scooter Software

        Comment

        • nja10331
          Visitor
          • Apr 2005
          • 3

          #5
          Re: Subset of directories on multiple servers

          Excellent!

          That seems to work.

          However... if I put in all of the directories I need to compare the script aborts and my verbose log reports:

          <font color="purple">
          4/13/2005 5:26:59 PM >> log verbose append:"c:\BC2\BC2Verbose.log"
          4/13/2005 5:26:59 PM User name: NJA10331n
          4/13/2005 5:26:59 PM >> #
          4/13/2005 5:26:59 PM >> # Load the default session
          4/13/2005 5:26:59 PM >> #
          4/13/2005 5:26:59 PM >> load <default>
          4/13/2005 5:26:59 PM >> #
          4/13/2005 5:26:59 PM >> #Set comparison criteria
          4/13/2005 5:26:59 PM >> #
          4/13/2005 5:26:59 PM >> criteria crc
          4/13/2005 5:26:59 PM >> #
          4/13/2005 5:26:59 PM >> #Set Filters
          4/13/2005 5:26:59 PM >> #
          </font>

          Nothing else...

          If I reduce the number of directories in my filter list, I can get it to work. So, how large can the filter actually be?

          Thanks!

          Comment

          • Chris
            Team Scooter
            • Oct 2007
            • 5538

            #6
            Re: Subset of directories on multiple servers

            I haven't run into a limit with the number of filters before, but then again I don't think I've tried to use a filter list that long either.

            Please email your script, along with a .zip of your settings using Help|Support and the Export button to [email protected] and I'll try to figure out what's causing the problem.
            Chris K Scooter Software

            Comment

            Working...