Announcement

Collapse
No announcement yet.

Mirroring a website automatically

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

  • Mirroring a website automatically

    I've started testing to get our website to mirror automatically.

    Here's my script:
    # yes to all (important to override when we have used a correct older file for example) just says yes to all prompts
    option confirm:yes-to-all
    # Turn logging on
    log verbose append:"Drive:\Web to Web Logs\webtowebSyncLogs%date%.txt"
    # Set comparison criteria
    criteria binary size timestamp
    # Exclude certain file types - include all?
    filter "*.*"
    # Load the base folders
    load "\\IP\drive$\Test Sync Folder" "\\IP\drive$\"
    #Make the target identical to the source
    #includes deleting files that only exist on the target side
    sync create-empty mirror:lt->rt

    Here's my .bat line:
    "Drive:\Program Files (x86)\Beyond Compare 3\BCompare.exe" @Drive:\Company\BeyondCompareSync\syncscript.txt

    (I've replaced actual drives, company names, and IPs with generic ones)

    I'm running into an issue where the beyond compare GUI shows several file differences, the script as is does not push the differences, modifying the script so that it points at a specific customer's sub folder (contained in both the source and target) WILL push the individual differences.

    The logging doesn't help at all, it indicates a few files couldn't be moved (8 total files out of 41) due to a service running (not an issue for me) but doesn't say anything about the other files that are all changed.

    I'm at a total loss as to what could be going on. The files have always had the same differences so even if their was some sort of bizarre comparison caching going on the differences should still be in place.

    I've got the same batch file being executed on a schedule and the same essential script being run from that batch file. When it is at the highest possible level the changes aren't seen and nothing is pushed. When it is at the individual customer file the changes are seen and are pushed.

    Is there some sort of explanation why this behavior is occurring? Why, if it sees the difference when only comparing subfolder to subfolder does it not see the differences when comparing root folder to root folder?

    To be clear the only difference in any part of the process is the following lines in the script:
    load "\\IP\drive$\Test Sync Folder" "\\IP\drive$\" doesn't work

    load "\\IP\drive$\Test Sync Folder\Customer1" "\\IP\drive$\Customer1" does work

    Here's from the logs (removed what was actually copied) where it worked:
    4/25/2016 11:42:40 AM >> sync create-empty mirror:lt->rt
    4/25/2016 11:42:40 AM Copied
    4/25/2016 11:42:40 AM Successfully synchronized 1 items. Completed in 0.05 seconds.
    4/25/2016 11:42:40 AM Script completed in 1.49 seconds

    Here's from the logs (removed what couldn't be copied) where it doesn't work:
    4/25/2016 10:06:33 AM >> sync create-empty mirror:lt->rt
    4/25/2016 10:08:15 AM Unable to copy
    4/25/2016 10:08:15 AM Unable to copy
    4/25/2016 10:08:15 AM Unable to copy
    4/25/2016 10:08:15 AM Unable to copy
    4/25/2016 10:08:15 AM Unable to copy
    4/25/2016 10:08:15 AM Unable to copy
    4/25/2016 10:08:15 AM Unable to copy
    4/25/2016 10:08:16 AM Unable to copy
    4/25/2016 10:08:16 AM Failed to synchronize 8 items. Completed in 1 minutes, 43 seconds.
    4/25/2016 10:56:34 AM Script completed in 50 minutes, 2 seconds

    No mention of the other 33 files that are different that can be moved.

  • #2
    Hello,

    Quick change: you wouldn't need to set both Binary and Size. Both are considered content scans for scripting, so you should select to use either binary timestamp or size timestamp. Does this clear up the root<>root vs subfolder<>subfolder issue you are running into?

    We may need to see a specific copy of your script and your BCSupport.zip (emailed to support@scootersoftware.com, with a link back to this forum thread) to help troubleshoot why you may be seeing different behavior between base folders and selecting subfolders as basefolders. Both should scan similarly, and our default script/session settings would scan the same between two script calls. The default Session Settings of the GUI can differ from script; you can add load <default> as the first line of script to load the GUI's default, then proceed to the rest of your script or reset the GUI's defaults to Factory Defaults. The single script example above looks ok; is the only change your base folder targets?

    It might help to create a fresh Portable Install running Factory defaults and use this for script testing. This would also guarantee the same settings are used even if different Windows accounts are launching the GUI or Script.

    This is likely a separate issue from the Unable to Copy error. To troubleshoot the copy issue, do you see errors if you copy using the BC4 GUI? If you go to a specific folder set and copy a trouble file with Explorer, does this give an extra prompt or error?
    Aaron P Scooter Software

    Comment

    Working...
    X