CVSync Command Manual


CVSYNC(1)

NAME

cvsync — synchronize CVS repositories

SYNOPSIS

cvsync [-46LVZhqvz] [-c file] [-p file] [URI ...]

DESCRIPTION

cvsync is a fast, portable, IPv6 capable CVS repository synchronization utility. cvsync consists of a client program cvsync, a server program cvsyncd, a supplemental tool cvscan, cvsup2cvsync, and, cvsync2cvsup.

cvsync retrieves CVS repository tree(s), which is called `collections' on the remote host where cvsyncd is running, and creates/updates the local mirror of them. The update algorithm allows to transfer just differences between sets of files across the network link, using cryptographic hash function and so on.

The following options are available:

-4

Forces cvsync to use IPv4 addresses only.

-6

Forces cvsync to use IPv6 addresses only.

-L

Forces cvsync to set `errormode' to `fixup' for all collections.

-V

Print the version number of cvsync to standard error.

-Z

Disables a compression.

-c file

Specifies the file to store configurations and collections.

-h

Print the location of the default configuration file, the protocol revision number, the version number of cvsync, and the usage to standard error.

-p file

Specifies the file to store a pid number.

-q

Be silent mode.

-v

Be verbose mode.

-z

Enables a compression.

CONFIGURATION FILE

cvsync uses a configuration file which specifies the remote host(s) and collections to be updated. Basically it is a free format plain text file whose keywords are separated by white space(s) and/or carriage return(s). Comments begin with `#' and extend to the end of the line.

The following keywords are available:

base directory

Specifies a prefix used for relative pathnames in all of the keyword `refuse' and `scanfile'. It must be an absolute path. This keyword is valid in `config'.

base-prefix directory

Specifies a prefix used for relative pathnames in all of the keyword `prefix'. It must be an absolute path. This keyword is valid in `config'.

collection { ... }

Specifies a collection to be updated. The keywords and parameters that are included in the succeeding braces are used to specify the collection name, the local path where the collection is stored, and so on.

compress

Enables a compression. This keyword is valid in `config'.

config { ... }

Defines a session with the keywords and parameters in the succeeding braces. A `config' has a `hostname' and a `port' number of a remote host, and one or more `collection' to be updated. cvsync processes every `config' of the configuration file in due order. A nest of `config' is not allowed.

errormode mode

Specifies the behavior when any potential errors/conflicts are found in local distributions.

The following modes are available:

abort

Exit with error messages immediately.

fixup

Recover errors/conflicts and keep running.

ignore

Ignore any errors/conflicts.

The default value is `abort'. This keyword is valid in `collection'.

hash type

Specifies the hash type that cvsync uses to verify files and deltas transferred during a synchronization. `md5' shall be supported in any environments. `ripemd160', `sha1', `tiger192' and, any other types are optional. The default value is `md5'. This keyword is valid in `config'.

host, hostname hostname

Specifies the remote host name. This keyword is valid in `config'.

loose

Obsoleted. Same to set `errormode' to `ignore'.

name name

Specifies a collection name to be updated. `all' is a special name that can be used with `release list' to fetch a list of available collections from the remote host. See also `release'. This keyword is valid in `collection'.

port number

Specifies the remote port number. The default value is 7777. This keyword is valid in `config'.

prefix directory

Specifies the directory where files of the retrieved collection are stored. It must be an absolute path. This keyword is valid in `collection'.

proto, protocol af

Forces cvsync to use an address family af.

The following address families are available:

inet, inet4, ipv4

IP version 4

inet6, ipv6

IP version 6

This keyword is valid in `config'.

refuse file

Specifies a refuse file name. Using the refuse file, the clients can specify sets of files that they does not wish to receive. The single pattern is permitted on each line, and files and directories matching the patterns are neither updated nor deleted; they are simply ignored. The patterns are interpreted by fnmatch(3). This keyword is valid in `collection'.

release type

Specifies a type of collections which are retrieved from the remote host. When most of files in a collection have a specific format such as rcsfile(5), cvsync can use optimized algorithms to transfer such files. However, it needs that `release type' is specified properly.

Using `release type', you can specify transfer a file tree itself in a collection or a partial information of the tree such as a specific revision in rcsfile(5). This is the reason why cvsync does not decide the collection type automatically.

The following types are available:

list

Fetch a list of available collections from the remote host. When `name' is specified as `all' the list contains all of the collections, when specified as `rcs' the list contains collections whose type is `rcs'. See also `name'.

rcs

Fetch a collection whose type is `rcs' from the remote host. The collection name must be specified in `name'.

This keyword is valid in `collection'.

scanfile file

Specifies the scanfile to store the information about a directory structure. When a scanfile is specified, cvsync does not scan a directory structure and use the information from the scanfile instead. This allows to reduce disk i/o load radically. This file is generated automatically if does not exist and is updated when cvsync is executed. It must be an absolute path. This keyword is valid in `collection'.

umask number

Forces cvsync to use a umask value of number. The default value is 022. This keyword is valid in `collection'.

URI SYNTAX

cvsync accepts the following URI syntax in addition to the config file.

cvsync://<host>[:<port>][/[<name>/<release>/][?prefix=....]]

host

Equivalent to `host' in `config'.

port

Equivalent to `port' in `config'. When this is omitted, `7777' is used by default.

name

Equivalent to `name' in `collection'. When this is omitted, `all' is used by default.

release

Equivalent to `release' in `collection'. When this is omitted, `list' is used by default.

prefix

Equivalent to `prefix' in `collection'. This can be omitted only when `release' is specified as `list'.

For example:

% cvsync cvsync://cvsync.example.com/

Retrieves a list of all collections from `cvsync.example.com'. This is equivalent to `cvsync://cvsync.example.com/all/list/'.

% cvsync cvsync://cvsync.example.com/netbsd/rcs/?prefix=/cvsroot

Retrieves `netbsd' collection from `cvsync.example.com' and store it into `/cvsroot' on the client. The collection type is `rcs'.

EXAMPLES

This is a typical configuration file to update a local mirror of the NetBSD repository:

config {
        hostname cvsync.example.com

        collection {
                name all release list
        }
}
config {
        hostname cvsync.example.com

        collection {
                name netbsd release rcs
                prefix /cvsroot
        }
}

The first config retrieves the available collection list on the remote host, and then the next config updates the `netbsd' collection. /cvsroot is the directory where the repository to be stored in on the client, and cvsync.example.com is a hostname of the remote host.

EXIT STATUS

The cvsync utility exits EXIT_SUCCESS on success, and EXIT_FAILURE if an error occurs.

SEE ALSO

cvscan(1), cvsyncd(1)

Jun 23, 2005


Top