Setup of Data Sync Tool
Installing Data Sync Tool
Before you begin
Ensure that you start ActiveMQ before performing the following steps.
To install the data sync tool, do the following:
Extract the data sync tool archive to a directory on your computer.
You can create a copy of the synced data on the file system by including the
-r
parameter and specifying the directory name.Copy the required JDBC driver libraries into the
lib
subdirectory.
Configuring Data Sync Tool
Modify the logging configuration in
log4j2.xml
as required.Configure the database connection settings for the source instance.
By default, the data sync tool reads settings from
sourceconfig.xml
. The contents of this file are similar to the following:<?xml version="1.0" encoding="UTF-8"?> <connectionconfiguration type="local"> <url>jdbc:derby:C:\ep\6.4.1\TrailInstaller-20090709-1536-01/tomcat-5.5/ep6demo</url> <login></login> <pwd></pwd> <driver>org.apache.derby.jdbc.EmbeddedDriver</driver> </connectionconfiguration>
Where:
<url>
contains the database URL<login>
contains the database username<pwd>
contains the database user password<driver>
contains the database driver class name
Configure the database connection settings for the target instance.
By default, the data sync tool reads settings from
targetconfig.xml
. The format of this file is identical to the source configuration file described in the previous step.
Command Line Reference
synctool {-e|-l|-f} [-a <adapter_name>] [-d <subdir>] [-p <parameter>] [-r <root_dir>]
[-s <source_config_file> [-t <target_config_file>]
-a, --adapter <adapter_name>
Not currently implemented. Specifies the adapter to use to perform the data sync. The adapter must be configured in the Data Sync Tool’s service.xml
configuration file.
-d, --subdir
Specifies the directory that contains the data file to be imported as well as the corresponding jobdescriptor.xml
and jobunit.dat
files. This parameter is required if you are performing an import (-l
).
-e, --export
Performs an export operation. The -r
and -p
parameters must also be specified.
-f, --full
Performs a complete sync operation. The data from the source instance is transferred into the target instance directly. The -r
parameter can be set if you want to create a copy of the exported data on the file system.
-l, --load
Performs an import operation. The -d
parameter and the -r
parameter must also be specified.
-p, --param <parameter>
Contains adapter specific parameters. For the default adapter, this must be set to the change set GUID.
-r, --root <root_dir>
Specifies the directory where data files will be exported. This parameter is required if you are performing an export (-e
without -f
). If it is not specified, a data file is not created. This parameter is also required if you are performing a load from an export (-l
).
-s, --source <source_config_file>
Specifies the file that contains the configuration for the source database. If this parameter is not specified, the default is sourceconfig.xml
.
-t, --target <target_config_file>
Specifies the file that contains the configuration for the target database. If this parameter is not specified, the default is targetconfig.xml
. This option does not need to be specified when performing an export (-e
)