A resync operation can be used to resynchronize a Sync Destination with the contents of the Sync Pipe's corresponding Sync Source.
The resync command operates on a single Sync Pipe at a time by retrieving entries from the Sync Source in bulk, comparing them with the corresponding entries at the Sync Destination, and if the entries are out-of-sync, acting according to the Synchronization Server configuration and command line options. If the --dry-run option is specified, then resync only logs what is out-of-sync. Otherwise, if the entry is missing, then it is created, and if attributes are out-of-sync, then they are updated. Details of the resync operation are written to a log with a configurable level of verbosity.
The resync command can optionally take in a file which contains a specific list of source DNs to synchronize. With this option, base-level searches will be issued for each DN in the file, rather than a bulk subtree search for a batch of entries. This functionality allows for very fine-grained control of which entries get synchronized, and also gives the ability to retry resync for entries that failed on a previous attempt. On very large data sets, this can be a practical way to avoid several long-running resync jobs. Any entries that fail to synchronize are written to the file specified in the --failedDNsFile argument, which can then be passed in as the --sourceInputFile argument on a subsequent run. The 'sync-failed-dns' file in the logs directory, which contains the DNs of all entries that have failed to synchronize (even after retries), can also be used as an input file for resync.
Resync can also run against a RDBMS environment (i.e. if the source of the specified Sync Pipe is a JDBC Sync Source). In this case you must either specify the --entryType argument to identify which database entry type to resync, or the --sourceInputFile argument to identify a file containing data to pass to the extension. The Server SDK extension is responsible for listing out all the database entries of that type and fetching them into LDAP entries, which are then processed based on the rules of the matching Sync Class and the command line options. Certain options such as --baseDN and --sourceSearchFilter, are not applicable for this type of resync and will have no effect. If a database is the destination of the Sync Pipe, then resync will behave just like it does with a normal directory-to-directory Sync Pipe, and all options may be used.
Entries synchronized from the Sync Source undergo the same filtering and mapping as during real-time synchronization. Entries are synchronized according to the settings in their matching Sync Class. The Sync Class controls what attribute and DN maps are used and whether entries at the destination are created or modified (this can be overridden with the --synchronizeCreates and --synchronizeModifies command line options). If an entry does not match any Sync Class, then it will be dropped.
The resync command line options give fine-grained control over what is synchronized. Specific Sync Classes can be included or excluded from synchronization. The set of source entries to be compared can be restricted using the --sourceSearchFilter option. Also, the set of attributes that are synchronized can be controlled by including or excluding both source and destination attributes from synchronization. Note: A destination attribute might depend on multiple source attributes (e.g., the 'initials' destination attribute might depend on both 'givenname' and 'sn' from the source), and a single source attribute might be used to construct the value of multiple destination attributes (e.g. 'givenname' at the source might be used to construct a value for both 'cn' and 'initials' at the destination). Including and excluding source attributes from resync can affect both of these scenarios. If a destination attribute depends on multiple source attributes, then all of those attributes must be included for synchronization (implicitly or explicitly) for that attribute to be updated.
The resync command is designed to function well in an environment where both the Sync Source and Sync Destination are actively being updated by other clients including the Synchronization Server synchronizing changes in real-time. There are a few options that are especially useful in these scenarios. When a value greater than one is provided with the --numPasses option, then resync rechecks out-of-sync entries multiple times to account for entries that are temporarily out-of-sync due to synchronization delays. The --dry-run option allows the administrator to preview any changes that would be applied by resync without updating the Sync Destination. Finally, the --ratePerSecond option can be used to limit the impact of the resync command on the end servers. By default, resync attempts to resynchronize the Sync Source and Sync Destination as quickly as possible, but this can have a performance impact on the servers. Explicitly setting the maximum resync rate of entries compared per second can limit this impact.
The resync command serves many purposes in a deployment.
When initially configuring a Sync Pipe with an empty Sync Destination, resync can be used to populate the Sync Destination with entries equivalent to the entries in the Sync Source before starting real-time synchronization. For very large deployments, it can be faster to export entries from the source into an LDIF file, run the translate-ldif tool to translate and filter the entries into the destination format, and then import the resulting LDIF file into the destination server.
Likewise, when initially configuring a Sync Pipe with a Sync Destination that already contains data, resync can be used to bring the Sync Destination in-sync with the Sync Source before starting real-time synchronization.
Running resync on a scheduled basis, for example nightly, can take the place of real-time synchronization in deployments where a synchronization delay is tolerable.
Running resync with the --dry-run option can be used to validate that real-time synchronization is behaving as expected. When coupled with the "--numPasses 3" option, for example, resync even avoids reporting entries that are only temporarily out-of-sync due to real-time synchronization delays.
If in an established deployment, the Synchronization Server is configured to only synchronize a subset of attributes from the Sync Source, then if that list of attributes is ever expanded, resync can be used to synchronize existing values of the newly added attributes in bulk.
resync --pipe-name "Some Sync Pipe" --numPasses 3
resync --pipe-name "Some Sync Pipe" --includeSyncClass Users \ --sourceSearchFilter "(createTimeStamp>=200503311200-0600)" \ --synchronizeCreates true --synchronizeModifies false
resync --pipe-name "Some Sync Pipe" --sourceSearchFilter "(uid=some-test-user)" \ --dry-run --logFilePath resync-debug.log --logLevel debug
resync --pipe-name "Some Sync Pipe" --includeSourceAttr givenname \ --includeSourceAttr sn --excludeDestinationAttr mail
resync --pipe-name "Some Sync Pipe" --sourceInputFile sourceDNs.txt
resync --pipe-name "Some Sync Pipe" --sourceInputFile sourceSQL.txt \ --entryType ACCOUNTS
-V
--version
Description | Display Synchronization Server version information |
-H
--help
Description | Display general usage information |
--help-debug
Description | Display help for using debug options |
Advanced | Yes |
-p {sync-pipe-name}
--pipe-name {sync-pipe-name}
Description | Name of the Sync Pipe to use when performing the resync |
Required | Yes |
Multi-Valued | No |
--includeSyncClass {sync-class-name}
Description | Name of the Sync Class to perform the resync on. This option can be used to restrict the resync operation to specific Sync Classes. If it is omitted, then resync synchronizes all Sync Classes in the Sync Pipe |
Required | No |
Multi-Valued | Yes |
--excludeSyncClass {sync-class-name}
Description | Name of the Sync Class to exclude from the resync operation. All Sync Classes in the Sync Pipe that are not excluded will be included in the resync |
Required | No |
Multi-Valued | Yes |
--baseDN {base-dn}
Description | Specify the base DN to search for the resync operation. If this option is not specified then all the base DNs from the Sync Source will be searched |
Required | No |
Multi-Valued | No |
--entryType {database-entry-type}
Description | When synchronizing from a database, this specifies the type of database entry to search for. This must match one of the configured entry types in the JDBCSyncSource |
Required | No |
Multi-Valued | No |
--sourceSearchFilter {source-ldap-filter}
Description | Specify the LDAP filter for source entries to include in the resync operation. If this option is not specified then all entries from the source that match a Sync Class will be included in the resync operation |
Required | No |
Multi-Valued | No |
--synchronizeModifies {true|false}
Description | Specify whether out-of-sync entries are always modified during the resync operation. If this option is not specified, then the synchronize-modifies property of the matching Sync Class determines whether a destination entry is modified |
Required | No |
Multi-Valued | No |
--synchronizeCreates {true|false}
Description | Specify whether missing entries are always created during the resync operation. If this option is not specified, then the synchronize-creates property of the matching Sync Class determines whether a destination entry is created |
Required | No |
Multi-Valued | No |
--includeSourceAttr {attribute}
Description | Restrict the set of source attributes that are synchronized to the destination. By default all source attributes are synchronized to the destination. If this option is specified, then only destination attributes dependent exclusively upon included source attributes will be modified |
Required | No |
Multi-Valued | Yes |
--excludeSourceAttr {attribute}
Description | Restrict the set of source attributes that are synchronized to the destination. By default all source attributes are synchronized to the destination. If this option is specified, then all destination attributes will be synchronized except those that depend on the specified source attributes |
Required | No |
Multi-Valued | Yes |
--includeDestinationAttr {attribute}
Description | Restrict the set of destination attributes that are synchronized. By default all destination attributes are synchronized. If this option is specified, then only the destination attributes specified with this option will be modified |
Required | No |
Multi-Valued | Yes |
--excludeDestinationAttr {attribute}
Description | Restrict the set of destination attributes that are synchronized. By default all destination attributes are synchronized. If this option is specified, then all destination attributes are synchronized except those specified with this option |
Required | No |
Multi-Valued | Yes |
--dry-run
Description | Do not modify anything at the destination, but report via the status and the log file what is out-of-sync |
--numPasses {num-passes}
Description | Specify the total number of times to compare an entry that is out-of-sync to account for synchronization delays. If both servers are quiescent, then a value of 1 can be provided. If either server is actively being modified, a larger value for this attribute might prevent false positives. For example, an entry reported as out-of-sync when in fact a modification to it has not yet synchronized. If a value greater than 1 is specified and a very large number of entries are out-of-sync, then the resync process might run out of memory since between passes it buffers in memory a small amount of information about each entry |
Lower Bound | 1 |
Upper Bound | 100 |
Default Value | 1 |
Required | No |
Multi-Valued | No |
--secondsBetweenPass {seconds}
Description | Specify the number of seconds to wait between each pass of rechecking entries that were out-of-sync in the hope that they are only temporarily out-of-sync due to synchronization delays |
Lower Bound | 0 |
Upper Bound | 1000 |
Default Value | 5 |
Required | No |
Multi-Valued | No |
-Q
--quiet
Description | Use quiet mode |
-r {comparisons-per-second}
--ratePerSecond {comparisons-per-second}
Description | Specify the target number of resync comparisons to perform per second. This can be used to throttle resync, reducing its load on the end servers. If this option is not provided, then the tool will run at the maximum rate for the specified number of threads |
Lower Bound | 1 |
Upper Bound | 100000 |
Required | No |
Multi-Valued | No |
--ratePerSecondFile {target-rate-file}
Description | Path to a file that contains the target rate per second. The resync command will target the rate specified in this file and will adjust its rate if the rate in the file changes. This option should only be used in place of the --ratePerSecond option if the rate needs to change during the resync run, for instance, if a resync of a very large dataset needs to be reduced during peak hours |
Required | No |
Multi-Valued | No |
-t {num-threads}
--numThreads {num-threads}
Description | Specify the number of threads to use when comparing entries during resync. Changing the number of threads can affect the throughput of resync as well as the performance impact on the end systems. When either of the endpoints is a database, be careful that the number of threads does not exceed the max connection pool size (configured on the JDBCSyncSource or JDBCSyncDestination). If this option is not provided, then the tool will use a default of 20 threads |
Lower Bound | 1 |
Upper Bound | 1000 |
Default Value | 20 |
Required | No |
Multi-Valued | No |
-o {resync-log-file}
--logFilePath {resync-log-file}
Description | Path to the file where details of the resync operation are logged (the default location is under |
Default Value | resync.log |
Required | No |
Multi-Valued | No |
-L {log-level}
--logLevel {log-level}
Description | Specify the resync log level that controls the amount of logging. Available options are ['none': No logging is performed]; ['out-of-sync-summary': A single summary message is logged for each missing or out-of-sync entry]; ['out-of-sync-detailed': A single detailed message, including the source and destination entry contents, is logged]; ['all-entries-summary': Multiple summary messages are logged for every entry that is loaded or compared. The contents of the entries are not logged]; ['all-entries-detailed': Multiple detailed messages are logged for every entry that is loaded or compared. The contents of the entries are included. Choosing this level can have an impact on performance and can result in a large output file if many entries are synchronized]; ['debug': Multiple verbose messages are logged for every entry that is loaded or compared. The contents of the entries are included during various stages of processing. This option should be reserved for diagnosing problems as it can drastically slow performance and generate a very large volume of log data]. The default is out-of-sync-summary |
Default Value | out-of-sync-summary |
Required | No |
Multi-Valued | No |
--sourceInputFile {source-input-file}
Description | Path to a file that contains a specific list of identifiers from the Sync Source that resync should consider. This can be used instead of the default bulk-search functionality. For LDAP Sync Sources, this file should contain a list of DNs; for JDBC Sync Sources, the data may be in a user-defined format since it will be consumed by a JDBC Sync Source extension |
Required | No |
Multi-Valued | No |
-F {failed-dn-file}
--failedDNsFile {failed-dn-file}
Description | Path to a file that will contain a list of DNs from the Sync Source that failed to synchronize for any reason (the default location is under |
Default Value | resync-failed-DNs.log |
Required | No |
Multi-Valued | No |