Search:

wcp Program Description

This file describes most of the wcp and wcpd functionality. Some minor features may be missing yet, some features may not be fully explained. You should also consult the manpages.

Invocation

wcp operation server [options]

where operation is one of

get
fetch single files from the server.

history
query file change information.

list
get file listings from the server

restore
restore files from the server.

store
store the local directory tree in the server space.

The server argument can either specify a local directory or a remote host using ssh as transport protocol with the notation

ssh://[user@]server:directory

The additional options depend on operation.

There are two other ways to specify the server parameter:

In both cases wcp will not expect the server parameter on the command line.

File exclusions

Usually wcp will archive all files in it's current working directory and below. Files with blanks in their name are ignored.

Files can be excluded by specifying a size limit or a regular expression.

-m maxsize[unit]
Files that are larger that maxsize bytes are ignored. maxsize may be followed by one of the characters b, k or M to set the value in bytes, kilobytes or megabytes. The default unit is kilobytes.

-o pattern
sets an extended regular expression for filenames to exclude.

Files can also be excluded on the server side with the maxsize and exclude configuration options which work exactly as described above.

User and superuser mode

There are two wcp modes: user mode for normal users and superuser mode when invoked by root. In superuser mode wcp has permissions to access all kind of files, in normal user mode not of course. To make things more difficult, wcp call it's server component wcpd which may also run in superuser or normal user mode. If none of the programs is setuid root the both program run with the same user id.

In user mode the programs will not have full permissions which has several effects:

When running in mixed mode (on program in user, the other in superuser mode) the usermode restriction from above still apply to the non-root side. If e.g. wcpd runs in superuser mode wcp is able to store files with their correct permissions and onwnerships (as fas as wcp is permitted to access them). But since wcpd has actually no setuid control this is not recommended.

wcpd configuration file

wcpd reads it's configuration from the file

if this file exists in the archive base directory.
The following options are supported.

exclude pattern
sets an extended regular expression for filenames to exclude.

maxsize maxsize[unit]
Files that are larger that maxsize bytes are ignored. maxsize may be followed by one of the characters b, k or M to set the value in bytes, kilobytes or megabytes. The default unit is kilobytes.

timeout number
sets a timeout in seconds for the client/server communication, the default is 60.

use-latest yes|no
specifies if the contents of wcpd's latest version file
should be used to compute the next version or not. If use-latest is set and
is not readable wcpd uses the available directories to compute the next version number.

write-latest yes|no
specifies if wcpd should write the latest version in the file
or not. The default is no.
.

Server side invocation

wcpd can initiate file archivals. For this wcpd must be started with the "-c connection-parameter" where connection-parameter has the form

ssh://[user[,sshkey]@]host:directory

where directory is the directory on host which should be archived.