Wydawca (split by section):   Section:   Chapter:FastBack: configuring   Up: configuring   FastForward: wydawca.conf   Contents: Table of ContentsIndex: Concept Index

4.12 Distribution Spool

A distribution spool defines the location of the source directory and the corresponding distribution (or destination) directory. It may also set archivation type, various dictionaries and notifications for that directory, thus overriding the global settings.

The spool block statement defines a distribution spool:

Config: spool tag { … }
spool tag {
  url url;
  alias (aliases);
  inotify bool;
  source dir;
  source-mode mode;
  source-owner uid gid;
  destination dir;
  destination-mode mode;
  destination-owner uid gid;
  file-sweep-time interval;
  dictionary { … }
  archive { … }
  notify-event { … }
}

The tag argument defines a unique identifier for this spool. It will be used in log messages and is available for variable expansion (see variable expansion) as the ‘$spool’ variable.

Config: spool: alias list

Defines a list of aliases, i.e. alternative tag names for this spool.

Config: spool: inotify bool

Enables or disables the inotify watcher for this spool. By default, inotify is always enabled on GNU/Linux systems (unless explicitly disabled at the configure time). See inotify, for a detailed description of this feature.

Config: spool: url string

Defines download URL, associated with this spool. Its value may be used as the variable ‘$url’ in mail notifications.

Config: spool: source dir

Specifies the location of the source directory.

Config: spool: source-mode mode

Sets directory mode for creating the source directory (octal). If the directory already exists, its mode will be checked and if necessary changed to mode.

This statement overrides the global directory-mode statement (see directory setup).

Config: spool: source-owner uid gid

Configures owner user and group IDs for the source directory. If the directory already exists, its ownership will be checked and if necessary reverted to uid:gid.

See directory-owner, for a discussion of the syntax for uid and gid.

This statement overrides the global directory-mode statement (see directory setup).

Config: spool: destination dir

Specifies the type and location of the destination directory. The dir argument must be either an absolute name of a directory on the local file system, or a special URL. Wydawca version 4.0.3 supports two destination URL schemes:

file://dir-name
dir://dir-name

Equivalent to dir-name alone. Defines a destination directory located on the local file system.

null:

Defines a null upload spool. Null spools implement all tests described in overview, but do not do any actual copying. The uploaded files are simply removed after checks are over. Null spools are useful mainly for diagnostic purposes.

The following two statements apply only if the destination is a local directory (‘file://’ or ‘dir://’ URL scheme):

Config: spool: destination-mode mode

Sets directory mode for creating the destination directory (octal). If the directory already exists, its mode will be checked and if necessary changed to mode.

This statement overrides the global directory-mode statement (see directory setup).

Config: spool: destination-owner uid gid

Configures the owner user and group IDs for the destination directory. If the directory already exists, its ownership will be checked and if necessary reverted to uid:gid.

See directory-owner, for a discussion of the syntax for uid and gid.

This statement overrides the global directory-mode statement (see directory setup).

The following statements, if present, override the corresponding global definitions for this spool.

Config: spool: archive { … }

Configure spool-specific archivation. See archivation, for its description.

Config: spool: dictionary tag { … }

Configure spool-specific dictionary. See dictionaries, for a detailed discussion of this statement.

Config: spool: file-sweep-time time

Set expiration time for triplets in this spool. A triplet is considered expired if its oldest file was created more than time seconds ago. This statement overrides the global ‘file-sweep-time’ setting (see file-sweep-time).

Config: spool: notify-event { … }

Configure spool-specific event notification. See notification, for a detailed discussion of this statement.

The source and destination statements are mandatory.

For example, the following definition says that valid uploads to /home/ftp/incoming/ftp should be transferred to /home/ftp/gnu:

spool ftp {
 url ftp://ftp.gnu.org.ua;
 source /home/ftp/incoming/ftp;
 destination /home/ftp/gnu;
}

This spool defines no particular archivation type, dictionary or notifications, so it will inherit these settings from the global configuration.

The following example shows the same spool, that additionally sets its own archivation method:

spool ftp {
 url ftp://ftp.gnu.org.ua;
 source /home/ftp/incoming/ftp;
 destination /home/ftp/gnu;
 archive directory {
   name .archive;
   backup numbered;
 }
}

Wydawca (split by section):   Section:   Chapter:FastBack: configuring   Up: configuring   FastForward: wydawca.conf   Contents: Table of ContentsIndex: Concept Index