Chapter 13 Using jagtool and jagant


sync

Description

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.

Syntax

Command line:

sync [-user username] 
[-password password]
[-clusterfiles true|false ]
[-packagefiles true|false ] 
[-servletfiles true|false ]
[-webappfiles true|false ]
[-appfiles true|false] 
[-clientappfiles true|false] 
[-connectorfiles 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

Ant build file:

<jag_sync [user="username"] 
[password "password"]
[clusterfiles "true|false "]
[packagefiles "true|false "] 
[servletfiles "true|false "]
[webappfiles "true|false "]
[appfiles "true|false"] 
[clientappfiles "true|false"] 
[connectorfiles "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
username The admin user name for remote connections. jagadmin No
password The admin password for remote connections. <none> No
clusterfiles 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
packagefiles Indicates all packages should be synchronized regardless of the type of entity specified by the entity parameter. false No
servletfiles Indicates all servlets should be synchronized regardless of the type of entity specified by the entity parameter. false No
webappfiles Indicates all Web applications should be synchronized, regardless of the type of entity specified by the entity parameter. false No
appfiles Indicates all applications should be synchronized regardless of the type of entity specified by the entity parameter. false No
clientappfiles Indicates all application clients should be synchronized regardless of the type of entity specified by the entity parameter. false No
connectorfiles Indicates all connectors should be synchronized, regardless of the type of entity specified by the entity parameter. false No
newprimary 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
newversion Indicates this sync command should result in a new cluster version number.

This option is relevant only if the cluster option is also specified.
false No
refresh Refreshes remote objects after the sync command finishes. false No
restart 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 restart option is also specified.
0 No
verbose Indicates a verbose server output log. false No
clustername The name of the cluster to be synchronized.

Either the cluster or the servers option must be specified.
- See description
serverURLs Server URLs in a comma-delimited list.

For example:

serverURL1,serverURL2,serverURL3


Either the cluster or the servers option must be specified.
- 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:

  • Cluster
  • Server
  • WebApplication
  • Application
  • Connector
  • Package
  • Component
- Yes

Examples

This example synchronizes the estore application on the servers in the cluster MyCluster.

Usage

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.

See Also

Chapter 6, "Clusters and Synchronization"

 


Copyright © 2002 Sybase, Inc. All rights reserved.