If running the synchronization through the scheduler mechanism is not flexible enough (perhaps you want to use your OS for scheduling tasks or run synchronization manually, on demand), there is a separate command line utility for triggering the synchronization process.

The utility is located in the bin subdirectory of the Teamwork Server installation directory. The utility is called synchronize.exe for Windows deployments and synchronize for Unix deployments. The utility has an accompanying synchronize.properties file.

This utility can be run from any computer (not just the servers), but most frequently it will be run on the target server. When the utility is run, it connects to the target server and initiates the synchronization procedure on it. There is no additional load on the computer running the utility; the procedure is run on the server side.

The utility outputs the synchronization progress messages.

A utility exists when the synchronization process is complete. It provides the exit codes (0 if synchronization is successful and >0 if errors are found). The exit code can then be used for shell scripting purposes (such as restarting synchronization in case of failure, etc.).

Please note that since the synchronization procedure is running on the server, exiting (or crashing or killing), the utility will not stop the synchronization process on the server. However, the utility does accept the Ctrl+C keyboard signal and stops the synchronization process on the server cleanly.

The utility takes 6 or 7 parameters. The last one, prefix, is optional. Parameters are mostly the same as the scheduled job, but there are additional parameters for specifying the target server to connect to (since the connection layout is now utility =>target server =>source server).

Here is a short synopsis:

synchronize (-h|--help) 

A help message.

synchronize [options] <targetserver>[:<targetport>] <targetuser> <targetpass> <sourceserver> [:<sourceport>] <sourceuser> <sourcepass> [<prefix>] <targetserver>, <targetport>, <targetuser>, <targetpass>

Server and user credentials for the synchronization target(usually local) server. This utility will connect to this server and initiate the synchronization procedure. The target server will then start the synchronization procedure and pull the necessary data from the source server.

<sourceserver>, <sourceport>, <sourceuser>, <sourcepass>

Server and user credentials for the synchronization source (usually remote) server. The target server will connect to this server using the supplied credentials and pull the necessary data.

<prefix>


Options:

-h, --help 

This help message.

-q, --quiet

Quiet synchronization. No information is displayed on the system output stream during synchronization. Errors are still reported on the system error stream.

--ssl 

Implies --targetssl and --sourcessl.

--targetssl

Use SSL connection between utility and target server.

--sourcessl

Use SSL connection between target server and source.

Example

synchronize tws.company.de sysop p@Ssw0rd tws.company.ca:1102 sync ssApcnys CA_

This command connects to the tws.company.de server with the sysop user p@Ssw0rd password and initiates the synchronization procedure, pulling the information from the tws.company.ca:1102 server:port, using the sync user ssApcnys password. Categories from the .ca server will get the CA_ prefix on the .de server (e.g. the category “Requirements” from the ca server will be named "CA_Requirements" on the .de server).

If necessary, you can make copies of the utility with the pre-defined parameters. To do that, you can copy the synchronize.exe and synchronize.properties to files with different names and modify the APP_ARGS parameter inside the copied *.properties file - specifying the necessary arguments.

For example, you can copy synchronize.exe to synchronizeDE_GB.exe and copy synchronize.properties to synchronizeDE_GB.properties. Inside the synchronizeDE_GB.properties, you can specify DE and GB server parameters in the APP_ARGS line the same way you would specify parameters on the command line. After this you get a single executable (with all parameters pre-specified), that can be run with one click.