Announcement

Collapse
No announcement yet.

sync create-empty mirror:left->right not working

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

  • sync create-empty mirror:left->right not working

    Hi All,

    I have created a small script for sync mirror to NAS appliances mapped on the N-drive (main) to the R-drive (backup) via the task scheduler at night.
    When I run the script it runs without error and says it synced some files. (see log file, in this case 2)
    If I sync it by starting BC manually it sync a lot more files ( > 100 !).

    I would like to see in the log file which files are going to be synced, delete, updated but cannot get that function working. (not in the code anymore at this moment)

    What am I missing. Please advise.

    Code:
    # Turn logging on.
    log normal append:"C:\log\BSO_NAS_01_03_SYNC_LOG %date%.log"
    
    # Load the base folders.
    load "N:\" "R:\"
    filter ".\snapshot"
    
    # Copy different files left to right, delete orphans on right.
    sync create-empty mirror:left->right
    Logfile:
    11/7/2018 8:41:00 AM >> # Turn logging on.
    11/7/2018 8:41:00 AM >> log normal append:"C:\log\BSO_NAS_01_03_SYNC_LOG 2018-11-07.log"
    11/7/2018 8:41:00 AM >>
    11/7/2018 8:41:00 AM >> # Load the base folders.
    11/7/2018 8:41:00 AM >> load "N:" "R:"
    11/7/2018 8:41:01 AM Load comparison: N:\ <-> R:\
    11/7/2018 8:41:01 AM >> filter ".\snapshot"
    11/7/2018 8:41:01 AM >>
    11/7/2018 8:41:01 AM >> # Copy different files left to right, delete orphans on right.
    11/7/2018 8:41:01 AM >> sync create-empty mirror:left->right
    11/7/2018 11:50:29 AM Successfully synchronized 2 items. Completed in 3 hours, 9 minutes.
    11/7/2018 11:50:29 AM Script completed in 3 hours, 9 minutes

  • #2
    Hello,

    From script, instead of using the sync command, replace it with two lines:
    log normal append:"C:\log\newlog_BSO_NAS_01_03_SYNC_LOG 2018-11-07.log"
    load "N:" "R:"
    expand all
    folder-report layout:side-by-side output-to:"C:\temp\bcreport.html" output-options:html-color

    This will help show you what the script is seeing. My hunch is that your filter is excluding unintended items. If you copy and paste that text into the filter toolbar of the graphical interface (without quotes) do you see your expected items? The above filter lacks a trailing \, so it would only be Including a filename of "snapshot" at the base level. Should it be working on a snapshot folder or files, and should it be Including or Excluding? To Exclude only a Snapshot folder would be:
    filter "-.\snapshot"
    which you can test in the graphical interface first by pasting the text into a Folder Compare session Filter toolbar and verify the comparison is loading and aligning as you expect before running as script.
    Aaron P Scooter Software

    Comment


    • #3
      Hello Aaron,

      The file that is produced by the program is to big to open, so I cannot see what it will sync.

      Comment


      • #4
        Hello,

        Did you get a chance to copy and paste the filter into the graphical interface? I would suggest using the interface to setup an identical session as script (step through each line of script and perform the same action in the interface):

        Launch BC4 with a new, blank Folder Compare with the factory default session settings (timestamp/size comparison).
        Load N: and R: as the base folders in the base folder paths
        Copy and paste the filter into the filter toolbar textbox: .\snapshot
        then hit enter to apply that filter.
        Aaron P Scooter Software

        Comment


        • #5
          Hello,

          The graphical interface does is correct.
          Last edited by MatKe; 19-Nov-2018, 07:08 AM.

          Comment


          • #6
            Hello,

            Could you post a full screen screenshot of the filter and comparison loaded? There may be another setting in place I'd like to review. If you also go to the Actions menu -> Synchronize -> Mirror Left to Right, does the preview look like what you need/expect? If emailing, please send to support@scootersoftware.com and include a link in the email back to this forum thread.
            Aaron P Scooter Software

            Comment


            • #7
              Hello,

              Please see the attachment.
              The comparsion is what we are expecting.
              Attached Files

              Comment


              • #8
                The screenshots are excluding a base level snapshot folder, while the script is including snapshot folders. Note the text in the main view toolbar:
                -.\snapshot\

                This is the text you would need for your filter line:
                filter "-.\snapshot"
                Aaron P Scooter Software

                Comment

                Working...
                X