Syntax
Select the syntax to use depending on whether you want to synchronize files in a
business object, the metadata for files in a business object, the store name, or
multiple business objects.
Synchronize Files in a Business Object
To synchronize using the business object, use the following command:
sync businessobject TYPE NAME REV [to [store] [location LOCATION_TARGET{,LOCATION_TARGET}]]
[from [store][location LOCATION_SOURCE{,LOCATION_SOURCE]] [update] [overwrite];
|
This command copies the business object’s files to the specified locations.
Synchronize the Store
To synchronize all files in a store, use the following
command:
All files within the named store are copied to the specified locations.
When comparing files between a remote and host store, the software looks for the
hashed name that is known to the database, for the business object associated
with the store or location, as well as the file size and permissions.
Synchronize Multiple Business Objects
To synchronize on more than one businessobject, use the sync
businessobjectlist command. For more information, see Sync businessobjectlist Clause.
Do not use the sync bus command within a transaction that also
performs a file checkin or filenames will be hashed.
Capturedfile FILE_STORE_NAME (sync metadata only)
Use the capturedfile clause to specify the file name in the
store.
If a row in the database is found that points to the location specified in this
command, the row will be replaced with the FILE_STORE_NAME
specified in the command.
Commit N Clause (sync store only)
Include the commit N clause when syncing large
stores.
The number N that follows specifies that the command should
commit the database transaction after this many objects have been synced. The
default is 10. For example:
sync store "Engineering-Dallas" continue commit 20
|
Continue Clause (sync store and sync buslist only)
Include the keyword continue if you do not want the command to stop if an error
occurs. In case of an error, the current businessobject is skipped and the command
continues on the next businessobject. If the log file is enable, failures are listed in
the file.
For example:
sync store “Engineering-Dallas” continue
|
If an error occurs when using the continue clause, the existing
transaction is rolled back, so any database updates that it contained are not
committed. The command starts again with the next business object. When using the
continue clause, include the commit clause.
Destination STORE_NAME/LOCATION_NAME (sync metadata only)
Use the destination clause to specify the store or location where
the physical file was updated with the external tool.
From Clause
Use the from clause to specify locations from which files will be
replicated to other specified locations.
For example:
sync store “Engineering-Dallas” continue commit 20 from location London,Paris,Milan
to location Moscow,Boston;
|
sync bus Assembly R123 A from location London,Paris,Milan store;
|
If you do not include the to keyword, all locations will be
updated, potentially including those listed in the from clause. You
can optionally include the store keyword in either the from or to
clause to include the store’s host and path.
If an on-demand sync is initiated for multiple locations, the sync will be rolled
back if the sync fails at any of the locations. For more information, see To Clause.
Overwrite Clause
The overwrite clause, used with the to|from location
and/or store clauses, forces an overwrite of files on those
servers. All files are copied to the specified locations/store without doing a
comparison.
For example:
sync store “Engineering-Dallas” continue commit 20 from location London,Paris,Milan
to location Moscow,Bostonoverwrite
|
sync bus Assembly R123 A from location London,Paris,Milan store overwrite
|
Sync businessobjectlist Clause
Use the sync businessobjectlist clause to specify a list of
business objects to sync.
sync businessobjectlist SEARCHCRITERIA [SYNC_ITEM {SYNC_ITEM}]
|
The keyword businessobjectlist can be shortened to
buslist .
For example:
sync buslist set MyAssemblies continue commit 20 to location London,Paris,Milan store;
|
SEARCHCRITERIA can include:
| set NAME |
|
| query NAME |
|
| temp set BO_NAME{,BO_NAME} |
|
| temp query [TEMP_QUERY_ITEM {TEMP_QUERY_ITEM}] |
|
| expand [EXPAND_ITEM {EXPAND_ITEM}] |
|
You can also use these specifications in Boolean combinations.
SYNC_ITEM can be any of the following:
| overwrite |
|
| update |
|
| commit N |
|
| continue |
|
| from [store | location NAME{,NAME} |
|
| to [store | location NAME{,NAME} |
|
| vcconnection |
|
| format NAME |
|
Format Clause
Each file managed by FCS has a format attribute. The policy governing the
businessobject owner of the file determines the formats that are allowed for the file.
It is possible to synchronize a list or set of businessobjects based on their format
attribute. The ability to synchronize only the files of a specified format reduces the
amount of data that needs to be synchronized, thus improving performance.
You must provide the name of the format that you want to synchronize after the
"format" keyword.
Example:
sync businessobjectlist SET1 from STORE to location locationS;
|
Here, SET1 is a set of businessobjects that is the same as a
businessobjectlist, STORE is a store, and
locationS is a location for store STORE .
A limitation of this feature is that only one format can be passed as a filter
argument at a time.
To Clause
If you want to sync only a subset of all of a store’s locations, include the
to location or store clause.
For example:
sync bus Assembly R123 A to location London,Paris,Milan store;
|
sync store “Engineering-Dallas” continue commit 20 to location London,Paris,Milan store;
|
When specifying only some locations, a comma (but not a space) is used as a
separator. Including the keyword store indicates that the store
itself (default host and path) should be updated, too.
If an on-demand sync is initiated for multiple locations, the sync will be rolled
back if the sync fails at any of the locations. For example, assume an on-demand
sync for five locations. The first two locations sync, but the third fails because
the machine is down. The fourth and fifth stores will probably not get synced,
depending on where the file is physically located and what order the stores are
created in.
- If the file lives in a downed store, none will get synced.
- If the file lives in a store that is online, then the sync will fail when it
reaches the downed store. Any stores that would have been synced after that
store will not be synced.
While the stores that were synced will retain the new file, the software will roll
back the sync command and think that only the original location of the file will
still have that file. The software will not know of any other locations that now
have the file.
Update Clause
Use the update clause to copy files only to locations that
contain a previous version of the
file.
For example:
sync store “Engineering-Dallas” continue commit 20 update;
|
sync bus Assembly R123 A update
|
|