Script Update Left to Right Only Seems to Copy New Files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wrx7m
    New User
    • Feb 2016
    • 2

    Script Update Left to Right Only Seems to Copy New Files

    Hi,

    I am trying to copy my Veeam backup jobs offsite but have run into a small issue with my script.

    I have saved a session (called "Veeam") that disables compare timestamps (the target changes the timestamp when the file is copied) and have left the compare file size option enabled. There is a .vbm file that gets updated (but the name remains the same) as part of Veeam backup jobs every time the backup job is run. There are two more files depending on the job type that get created- .vib and .vbk, which are newly named with the job name and date and time (there are also some older .vbr files that I do not want to update on the right). So I have created the following script to update left to right.

    Code:
    # Turn verbose logging on.
    log verbose "C:\Backups\BeyondCompare4\Logs\QVeeamFM01.txt"
    # Load Veeam session and filter number of days and exclude vrb files.
    load Veeam
    filter "-*.vrb;"
    filter cutoff:<9days
    # Load base folders.
    load "Q:\Veeam\FM01" "W:\Veeam\FM01"
    # Copy different files left to right.
    sync update:left->right
    The script runs without error and when there are .vib and/or .vbk files that don't exist on the right side, they are copied over but for some reason the .vbm file, which does exist, does not get updated to the latest on the right side. When I view the session and base path in the GUI, it shows the .vbm files as red/different because the file sizes are, in fact, different.

    I have also tried adding the copy command after a filter like so:

    Code:
    # Turn verbose logging on.
    log verbose "C:\Backups\BeyondCompare4\Logs\QVeeamFM01.txt"
    # Load Veeam session and filter number of days and exclude vrb files.
    load Veeam
    filter "-*.vrb;"
    filter cutoff:<9days
    # Load base folders.
    load "Q:\Veeam\FM01" "W:\Veeam\FM01"
    # Copy different files left to right.
    sync update:left->right
    filter "*.vbm"
    # Copy vbm files left to right.
    copy left->right
    I have also played around with different combinations but each time the log shows that the script completes but no files are transferred.

    What am I doing wrong?

    Thanks!
  • Chris
    Team Scooter
    • Oct 2007
    • 5538

    #2
    If you turn off timestamp comparison, then "sync update:left->right" command will only copy orphan files. If you want to copy files with size differences, use the "sync mirror:left->right" command. Be careful because mirror will also delete orphan files in the target folder.
    Code:
    # Turn verbose logging on.
    log verbose "C:\Backups\BeyondCompare4\Logs\QVeeamFM01.txt"
    # Load Veeam session and filter number of days and exclude vrb files.
    load Veeam
    filter "-*.vrb;"
    filter cutoff:<9days
    # Load base folders.
    load "Q:\Veeam\FM01" "W:\Veeam\FM01"
    # Copy different files left to right, delete right orphans
    sync mirror:left->right
    If you just want to copy orphan files, then force the copy of *.vbm files, you need a select command before the copy command.
    Code:
    # Turn verbose logging on.
    log verbose "C:\Backups\BeyondCompare4\Logs\QVeeamFM01.txt"
    # Load Veeam session and filter number of days and exclude vrb files.
    load Veeam
    filter "-*.vrb;"
    filter cutoff:<9days
    # Load base folders.
    load "Q:\Veeam\FM01" "W:\Veeam\FM01"
    # Copy different files left to right.
    sync update:left->right
    filter "*.vbm"
    # Copy vbm files left to right.
    select left.files
    copy left->right
    Chris K Scooter Software

    Comment

    • wrx7m
      New User
      • Feb 2016
      • 2

      #3
      Thanks, Chris! The select.files line was the missing piece!

      Comment

      Working...