Technical Note: XTN1701

Configuring an Archive Mirror Using Beyond Compare

Updated Feb. 1, 2017

Overview
Beyond Compare from Scooter Software (http://www.scootersoftware.com) is an inexpensive utility for mirroring a file-folder structure on one computer to another. It has been certified to work with an archive running XenData6 Server software, version 6.22 or later.

In creative video applications, mirroring active projects on shared primary disk storage to a XenData Volume Set can provide valuable data protection. This is in addition to a more conventional use for an archive which is moving completed projects to the archive to free space on the primary disk storage.

This technical note gives an overview of how to configure the XenData archive and Beyond Compare software to implement mirroring. With appropriate configuration, the Beyond Compare software will provide a log of all file transactions.

Configure XenData as a Target for the Mirror
Create a new folder on the XenData volume to be the designated target for the mirror.

From the XenData Management Console create a new Volume Set and a File Group rule that sends all files written to the new folder to the new Volume Set. Details of how to configure Volume Sets and File Group rules are found in the XenData Administrator Guide.

Mount your shared primary disk storage on the XenData server, either via a network share or a locally mounted SAN.

Scripting using Beyond Compare
Install the Beyond Compare software local on the XenData server. This creates several executable programs including BCOMP.COM which is run to execute mirroring defined by a simple script that you must write. The script should be stored on the C: drive of the XenData server. The BCOMP.COM executable is run on a schedule using Windows Task Scheduler.

A sample script looks like:

# Turn logging on.
log verbose "C:\Sync\Log\BC_Sync-%DATE%-%fn_time%.log"
# Load the default session.
load <default>
# Load the base folders “LEFT-Source” “RIGHT-Destination”.
load "C:\Sync" "X:\Sync"
# Copy different files left to right, delete orphans on right.
sync create-empty mirror:left->right

See below for details of each line:

LOG

Usage:
log [none|normal|verbose] [[append:]<filename>]
Controls how detailed the log is and where the log is stored.

  • none, normal and verbose determine the amount of detail used in the log. Logging is initially disabled and begins when the mode is changed from none.
  • append: causes logging to add to the file instead of replace it. By default, the log is output as Log.txt in the current folder (e.g. the Windows "Start In" folder in shortcut properties).

By using the %DATE% and %fn_time% variables you can create individual log files for each run of the automated operation.

LOAD

Usage:
load <session>
load [create:(all|left|right)] <left path> [<right path>]
load <default>
Loads the specified Folder Compare session, the specified base folders or a new Folder Compare session with default settings (load <default>). Failure to load a base folder will cause the script to terminate.

  • Loading a session causes all that session's settings, except the display filter (show all, only mismatches, only matches, etc.), to be used.
  • Loading base folders uses the currently active settings. By default, the program defaults are used.
  • The optional create parameter creates a base folder if it doesn't already exist.

Examples:
load "My Session"
load "C:\My Folder" "X:\Your Folder"
load <default>

SYNC

Usage:
sync [visible] [create-empty] (update|mirror):(left->right|right->left|all)
Synchronizes folders by copying and deleting files. This command does not use the current selection.

  • visible enables "Only affect visible files" behavior. Only files in expanded folders will be affected.
  • create-empty enables the "Create empty folders" behavior.
  • update copies newer and orphan files in the indicated direction, leaving orphans and newer files on the opposite side unchanged. Using all as the direction indicates a bidirectional sync and copies newer and orphan files in both directions.
  • mirror makes the target folder identical to the source one. Newer, older, different and orphaned files are all copied to the destination. Orphans in the destination are deleted. The all direction doesn't apply in this context and is not valid.

Example:
sync create-empty mirror:left->right

Protected system files (Office ~$___ files or Thumbs.db) will not be copied by default. You must add the line filter include-protected to sync them as well.

More switches and options are available and are described on the Scooter Software web site.

Defining a Schedule
Open Task Scheduler, from the start menu click the windows icon in the lower left corner and start typing "Task Scheduler". It should pop up as a highlighted option.

From the Task Scheduler actions pane select "Create Task…".

Name your task and set the task to Run whether the user is logged on or not. Change the user to one that has full access to both the source and destination paths.

On the Triggers Panel, add a new trigger and set the required schedule.

On the Action panel, click "New…". Browse for BCOMP.COM in the installation folder of Beyond Compare.

In the arguments section add @"ScriptName.txt" /silent

In the Start in specify the folder location of the script file.

Click OK and set any other Conditions or Settings you may need.

Test your script by right clicking it in the Task Pane and select "Run". If there are any errors check your log files for details and troubleshoot.

Your script will now run autonomously creating log files that report which files were mirrored and when.

Applicable Operating Systems

  • Windows Server 2012 R2
  • Windows Server 2016
  • Windows Server 2019

Applicable XenData Software
This technical note is applicable to:

  • Version 6 – Server Editions of Archive Series software
  • Version 7 – Server Editions of Archive Series software including the Cloud File Gateway