Generating Scripts for Data Sync - Two-Way Sync

Generate scripts for the data sync operation.


  1. Download the Sample XML File and save the file with restore_by_job.xml name on the CommServe.
  2. Open the restore_by_job.xml file using an XML editor and provide a value for the following parameters:
    • clientName - Name of the destination computer
    • destClient - Name of the source computer
    • destPath - Path for restoring the files
    • mapFilePath - Path of the map file

    Note: This XML file will be used as an input file for the batch file which picks up the last successful backup job and triggers a restore by job operation for that job.

  3. Add the following content to a file and save the file as restore_last_backup.bat on the CommServe. Make sure that the file is saved as a batch file (.bat extension).

    @echo off
    if not defined GALAXY_BASE set GALAXY_BASE=SoftwareInstallationDirectory\Base
    set response="RBJ_13328124.tmp"
    set BackupJobID =0
    qlogin -u "Username" -ps "Password" -cs "CommServeName"
    if %errorlevel% NEQ 0 (
    echo Login failed.
    goto endOfScript
    :The following command fetches the last successful backup job id.
    FOR /F "skip=2" %%J IN ('qlist lastjob -c Destination_computer -a Q_FILESYSTEM -b "defaultBackupSet" -s "SubClientName" -js Completed') do (
    set BackupJobID= %%J
    :The following command triggers the restore by job using Command Line.
    qoperation execute -cs CommServeName -af Path_of_the_xml_file -jobids %BackupJobID% -sourceItem "2:%BackupJobID%"

  4. Provide the following input values in the saved batch file:
    • SoftwareInstallationDirectory - Software installation directory
    • Username, Password - User details saved in the Record the Username and Password procedure.
    • CommServeName - Name of the CommServe
    • Source_computer - Name of the destination computer
    • SubClientName - Name of the subclient
    • Path_of_the_xml_file - Path of the restore_by_job.xml file.

Last modified: 1/12/2018 12:23:56 PM