Announcement

Collapse
No announcement yet.

Mirror not working/available

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mirror not working/available

    I've been using BC for years but this is my first attempt at scripting.

    I have a simple script which should mirror (not update) the files on the left to the right but.... if I have a file on the right hand side that is newer than the file with matching filename on the left hand side I want the newer file to get
    overwritten but it stays the same.

    Here is my script

    log verbose "%MATT_LOGS%\DRSync.log"
    criteria rules-based
    load "%MATT_HOME%_Source" "%MATT_HOME%_Destination"
    filter "-Network.cfg"
    sync create-empty mirror:left->right

    I've read other forum posts which suggest making sure that the same operation would work from within the GUI and yes, it does work in the GUI when I use Actions > Synchronise -> Mirror To Right.

    Any ideas what I'm doing wrong?

    I'm using 3.3.8 (16340) Pro

    Thanks

    Matt

  • #2
    Hello,

    Are both files Rules-based equal in the interface? If you view the files, do they appear as a 'similar' or equal status? Your current script would only mirror if the files were rules-based different, while the interface would default to a timestamp/size comparison.

    Do other files (such as orphans on the left) copy over, and orphans on the right deleted? This would help determine if it is the current criteria that is causing you issue.

    Are any specific steps failing for you or noted in the log, or is it "Sync Successful" without syncing all of the items you intend?
    Aaron P Scooter Software

    Comment


    • #3
      In the GUI the files show up in red colour (i.e. not blue or black)

      In session settings I have all of the quick tests unticked and in the Compare contents section I have "Compare Contents", "Rules-based comparison" and "Override quick test results" ticked. For a GUI mirror everything works

      When running my script....
      Orphans on the left do copy over to the right
      Orphans on the right are deleted

      e.g. everything works except that newer files on the right do not get overwritten by older files from the left.

      Here is the bottom of the log :

      24/09/2013 13:42:20 >> # Sync the Source files to Destination
      24/09/2013 13:42:20 >> sync create-empty mirror:left->right
      24/09/2013 13:42:20 Copied \\MrButtons\Matt\_Source\leftorphan.txt to \\MrButtons\Matt\_Destination
      24/09/2013 13:42:20 Deleted \\MrButtons\Matt\_Destination\rightorphan.txt
      24/09/2013 13:42:20 Successfully synchronized 2 items. Completed in 0.1 seconds.
      24/09/2013 13:42:24 >>
      24/09/2013 13:42:24 Script completed in 4.46 seconds

      Curious

      Matt

      Comment


      • #4
        Reply

        I did post a reply - not sure why its not showing

        let me know if I need to re-post

        Comment


        • #5
          Looks like I do need to repost....

          In the GUI (where everything works perfectly) the file that I want to be overwritten on the right hand side shows as red (i.e. not blue or black).

          Orphans on the left copy to the right
          Orphans on the right get deleted

          Here is the log :

          24/09/2013 13:42:19 >> # Turn verbose logging on.
          24/09/2013 13:42:19 >> log verbose "\\Matt\logs\DRSync.log"
          24/09/2013 13:42:19 >>
          24/09/2013 13:42:19 >> # Set the comparison criteria.
          24/09/2013 13:42:19 >> criteria rules-based
          24/09/2013 13:42:19 >>
          24/09/2013 13:42:19 >> # Load source and target folders.
          24/09/2013 13:42:20 >> load "\\Matt\_Source" "\\Matt\_Destination"
          24/09/2013 13:42:20 Load comparison: \\Matt\_Source <-> \\Matt\_Destination
          24/09/2013 13:42:20 >>
          24/09/2013 13:42:20 >> # Filter to only include source files, ignore CVS subfolders.
          24/09/2013 13:42:20 >> filter "-Network.cfg"
          24/09/2013 13:42:20 >>
          24/09/2013 13:42:20 >> # Sync the PROD files to DR
          24/09/2013 13:42:20 >> sync create-empty mirror:left->right
          24/09/2013 13:42:20 Copied \\Matt\_Source\leftOrphan.txt to \\Matt\_Destination
          24/09/2013 13:42:20 Deleted \\Matt\_Destination\rightOrphan.txt
          24/09/2013 13:42:20 Successfully synchronized 2 items. Completed in 0.1 seconds.
          24/09/2013 13:42:24 >>
          24/09/2013 13:42:24 Script completed in 4.46 seconds

          Comment


          • #6
            Hello,

            I would suspect this means your graphical interface is configured to use the timestamp/size, at least in addition to the rules-based criteria. Could you double check the graphical session's Session menu -> Session Settings, Comparison tab. Which items are checked here?

            If it is just Timestamp/Size/Override Quick Test Results, you can remove the criteria rules-based line, and this would be used.

            If it is Timestamp/Size/Override Quick Test/Rules-based, please use:
            criteria timestamp:2sec rules-based

            How does this help with your current script?
            Aaron P Scooter Software

            Comment


            • #7
              As I mentioned on 24-Sep-2013, 06:48 AM I have none of the "Quick tests" checkboxes ticked at all.

              If I use criteria timestamp:2sec rules-based in my script the file still does not get overwritten on the right hand side.

              It really makes no sense

              Thanks

              Matt

              Comment

              Working...
              X