svnsync is the Subversion remote repository mirroring tool. Put simply, it allows you to replay the revisions of one repository into another one.
In any mirroring scenario, there are two repositories: the source repository, and the mirror (or “sink”) repository. The source repository is the repository from which svnsync pulls revisions. The mirror repository is the destination for the revisions pulled from the source repository. Each of the repositories may be local or remote—they are only ever addressed by their URLs.
The svnsync process requires only read access to the source repository; it never attempts to modify it. But obviously, svnsync requires both read and write access to the mirror repository.
svnsync is very sensitive to changes made in the mirror repository that weren't made as part of a mirroring operation. To prevent this from happening, it's best if the svnsync process is the only process permitted to modify the mirror repository.
Options in svnsync are global, just as they are in svn and svnadmin:
Disables the verification (which svnsync initialize performs by default) that the repository being initialized is empty of history version.
Instructs Subversion to read configuration information from the specified directory instead of the default location (
.subversionin the user's home directory).
Sets, for the duration of the command, the value of a runtime configuration option.
CONFSPECis a string which specifies the configuration option namespace, name and value that you'd like to assign, formatted as
VALUE]. In this syntax,
SECTIONare the runtime configuration file (either
servers) and the section thereof, respectively, which contain the option whose value you wish to change.
OPTIONis, of course, the option itself, and
VALUEthe value (if any) you wish to assign to the option. For example, to temporarily disable the use of the automatic property setting feature, use
--config-option=servers:global:http-library=serf. You can use this option multiple times to change multiple option values simultaneously.
Causes svnsync to bypass its own exclusive access mechanisms and operate on the assumption that its exclusive access to the mirror repository is being guaranteed through some other, out-of-band mechanism.
Prevents caching of authentication information (e.g., username and password) in the Subversion runtime configuration directories.
In the case of an authentication failure or insufficient credentials, prevents prompting for credentials (e.g., username or password). This is useful if you're running Subversion inside an automated script and it's more appropriate to have Subversion fail than to prompt for more information.
Requests that the client print only essential information while performing an operation.
Used by svnsync copy-revprops to specify a particular revision or revision range on which to operate.
Specifies the password for the Subversion server from which you are syncing. If not provided, or if incorrect, Subversion will prompt you for this information as needed.
Instructs svnsync to assume that translatable Subversion revision properties found in the source repository are stored using the character encoding
ARGand to transcode those into UTF-8 when copying them into the mirror repository.
Specifies the username for the Subversion server from which you are syncing. If not provided, or if incorrect, Subversion will prompt you for this information as needed.
Causes svnsync to steal, as necessary, the lock which it uses on the mirror repository to ensure exclusive repository access. (This option should only be used when a lock exists in the mirror repository and is known to be stale—that is, when you are certain that there are no other svnsync processes accessing that repository.)
Specifies the password for the Subversion server to which you are syncing. If not provided, or if incorrect, Subversion will prompt you for this information as needed.
Specifies the username for the Subversion server to which you are syncing. If not provided, or if incorrect, Subversion will prompt you for this information as needed.
--non-interactiveto accept any unknown SSL server certificates without prompting.