Synchronizes entities in the current repository to one or more remote repositories. Synchronization can be used to create identically configured servers in a cluster, or to copy entities from one server to another.
sync connect-args [-clusterfiles true|false ] [-packagefiles true|false ] [-servletfiles true|false ] [-webappfiles true|false ] [-appfiles true|false] [-clientappfiles true|false] [-connectorfiles true|false] [-syncwebappjavaclasses true|false] [-newprimary true|false] [-newversion true|false] [-refresh true|false] [-refresh true|false] [-restart true|false] [-waitfor waittime] [-verbose true|false] [-cluster clustername] [-servers serverURLS] entity
<jag_sync [clusterfiles="true|false="] [packagefiles="true|false="] [servletfiles="true|false="] [webappfiles="true|false="] [appfiles="true|false"] [clientappfiles="true|false"] [connectorfiles="true|false"] [syncwebappjavaclasses="true|false"] [newprimary="true|false"] [newversion="true|false"] [refresh="true|false"] [refresh="true|false"] [restart="true|false"] [waitfor="waittime"] [verbose="true|false"] [cluster="clustername"] [servers="serverURLS"] entity=”entity” />
Option |
Description |
Default |
Required |
---|---|---|---|
connect-args |
Arguments to specify a connection to the server. See “Using connected mode”. |
- |
Yes |
|
Indicates all cluster files should be synchronized (all files in Repository/Security, the property file for the cluster, and any server properties found in the cluster definition). |
false |
No |
|
Indicates all packages should be synchronized regardless of the type of entity specified by the entity parameter. |
false |
No |
|
Indicates all servlets should be synchronized regardless of the type of entity specified by the entity parameter. |
false |
No |
|
Indicates all Web applications should be synchronized, regardless of the type of entity specified by the entity parameter. |
false |
No |
|
Indicates all applications should be synchronized regardless of the type of entity specified by the entity parameter. |
false |
No |
|
Indicates all application clients should be synchronized regardless of the type of entity specified by the entity parameter. |
false |
No |
|
Indicates all connectors should be synchronized, regardless of the type of entity specified by the entity parameter. |
false |
No |
|
When synchronizing Web application files, whether to include class files included in the Web application’s custom class list. |
true |
No |
|
Indicates that the sync primary specified with this option overrides the default. This option is required when the sync command is initiated from a different server than the one used previously to connect to the current target. |
false |
See description |
|
Indicates this sync command should result in a new cluster version number. This option is relevant only if the |
false |
No |
|
Refreshes remote objects after the sync command finishes. |
false |
No |
|
Restarts remote servers after the sync command finishes. |
false |
No |
waittime |
Indicates a period of time in seconds to wait for a remote server to restart before restarting the next server. This command is relevant only if the |
0 |
No |
|
Indicates a verbose server output log. |
false |
No |
clustername |
The name of the cluster to be synchronized. Either the |
- |
See description |
serverURLs |
Server URLs in a comma-delimited list. For example: serverURL1,serverURL2,serverURL3 Either the |
- |
See description |
entity |
The name of the entity to be synchronized, in the form EntityType:EntityName as described in “Entity identifiers”. EntityType must be one of the following:
|
- |
Yes |
Return value |
Indicates |
---|---|
0 |
The command ran successfully; the result is true/success. |
2 |
The command did not run successfully; an exception was thrown. |
This example synchronizes the estore application on the servers in the cluster MyCluster.
Command line:
jagtool sync -cluster MyCluster Application:estore
Ant build file:
<jag_sync cluster="MyCluster" entity="Application:estore" />
If you specify a cluster (using the cluster
option)
when a previous sync command to the cluster came
from a different source/primary, then you must specify
the -newprimary
option. Otherwise,
the sync command fails.
Chapter 6, “Clusters and Synchronization”
Copyright © 2005. Sybase Inc. All rights reserved. |