continual-sync.conf - The configuration file for continual-sync
The continual-sync.conf file is a configuration file for continual-sync(1). It defines one or more directory trees to be synchronised, where to synchronise them to, and the associated parameters.
The file consists of sections and parameters. A section begins with the name of the section in square brackets and continues until the next section begins. Sections contain parameters of the form:
name = value
The file is line-based - that is, each newline-terminated line represents either a comment, a section name or a parameter.
Section and parameter lines are case sensitive.
Section names must consist only of alphanumeric characters, "-", ".", and "_".
Only the first equals sign in a parameter is significant. Whitespace before or after the first equals sign is discarded. Leading, trailing and internal whitespace in parameter names is irrelevant. Leading and trailing whitespace in a parameter value is discarded. Internal whitespace within a parameter value is retained verbatim.
Any hash ("#") character causes that hash, and the rest of that line, to be ignored.
A maximum of 999 sections can be defined, across all configuration files read by continual-sync.
Each section defines a directory tree to be synchronised. It must have a unique name and give a source and a destination. The bare minimum for a valid section definition is therefore:
[section_name]
source = /path/to/source/directory/
destination = remotehost:/remote/path/to/sync/to/
Additional parameters may be specified to fine-tune the synchronisation process.
The exception to the above is the special defaults section, which defines default values which are used by all other sections. The defaults section must not specify either a source or a destination.
These parameters can only appear within a section, and apply only to that section. Unless otherwise specified, every parameter is optional; any which are not defined will use the setting from the defaults section if there is one.
This parameter is mandatory for every section except defaults, where it is forbidden.
It is usually best to ensure that the trailing slash (/) is present to ensure correct operation with rsync(1).
This parameter is mandatory for every section except defaults, where it is forbidden.
It is usually best to ensure that the trailing slash (/) is present to ensure correct operation with rsync(1).
This parameter can be specified multiple times per section.
The default is to exclude *.tmp and *~, unless overridden by the defaults section.
This can be used to check that the source directory is mounted. For example:
source validation command = mountpoint -q %s
The default is to use no source validation command, unless overridden by the defaults section. To explicitly state that no source validation command is to be run, use a value of none.
This can be used to check that the destination host is up and the directory is mounted. For example:
destination validation command = ssh %h mountpoint -q %d
The default is to use no destination validation command, unless overridden by the defaults section. To explicitly state that no destination validation command is to be run, use a value of none.
If no full sync marker file has been defined, then a full sync is run every time the watch starts.
The default full sync interval is 86400 seconds (1 day) unless overridden by the defaults section.
If the full sync interval is set to 0, then a full sync will never be run. This is not recommended unless you will be running a full sync yourself through some other mechanism, as the partial sync process is not perfect and so some changes may be missed.
The default full sync retry wait time is 3600 seconds (1 hour) unless overridden by the defaults section.
The default partial sync interval is 30 seconds unless overridden by the defaults section.
If the partial sync interval is set to 0, then the source directory will not be watched for changes and no partial synchronisations will be run.
The default partial sync retry wait time is 300 seconds (5 minutes) unless overridden by the defaults section.
The default recursion depth is 20 unless overridden by the defaults section.
Subdirectories deeper than this will not be watched for changes, but they will be picked up by rsync when a full sync is run.
This can be used to ensure that a full sync is not run more often than the full sync interval, even if the program is restarted.
The default is to use no full sync marker file, unless overridden by the defaults section. To explicitly state that no full sync marker file is to be used, use a value of none.
This can be used to expose the information to other programs.
The default is to use no partial sync marker file, unless overridden by the defaults section. To explicitly state that no partial sync marker file is to be used, use a value of none.
The default is to create a temporary directory which is automatically removed when the program exits. If a value has been specified in the defaults section, you can override it on a per-section basis with a value of none to go back to the temporary directory behaviour.
The default is to create a temporary file which is automatically removed when the program exits. If a value has been specified in the defaults section, you can override it on a per-section basis with a value of none to go back to the temporary file behaviour.
This can be used to ensure that only one sync at a time runs to a given destination; for example:
[dir1]
source = /home/dir1/
destination = host1:/home/dir1/
sync lock = /var/lock/sync-%h.lock
[dir2]
source = /home/dir2/
destination = host1:/home/dir2/
sync lock = /var/lock/sync-%h.lock
[dir3]
source = /home/dir3/
destination = host2:/home/dir3/
sync lock = /var/lock/sync-%h.lock
In the above example, dir1 and dir2 share the same sync lock of /var/lock/sync-host1.lock, and so only one of them at a time would ever be running a sync; dir3 uses a different lock and so could be running a sync at the same time as either dir1 or dir2.
The default is not to use a lock, unless overridden by the defaults section.
To explicitly state that no lock is to be used, specify a value of none.
The default is "--delete -axH".
The default is "--delete -dlptgoDH".
Use this when files disappear from the source quite often, such as a Subversion repository that is in active use.
The default is to write no logs, unless overridden by the defaults section.
To explicitly state that no log file is to be written, use a value of none.
The status file is not read by the sync process - use the marker file options if you want to retain memory of the last full and partial sync times between invocations of continual-sync(1).
The default is to write no status file, unless overridden by the defaults section.
To explicitly state that no status file is to be written, use a value of none.
The following special parameters can appear anywhere in a configuration file:
include = /etc/continual-sync.conf.d/*
Files ending in ~, .rpmsave, .rpmorig, and .rpmnew are automatically skipped.
The following character sequences may be used in the values of certain parameters:
These may be used in any of the following parameter values:
source validation command
destination validation command
full sync marker file
partial sync marker file
change queue
transfer list
temporary directory
sync lock
full rsync options
partial rsync options
log file
status file
Report bugs in continual-sync by using the contact form linked from the package home page: <http://www.ivarch.com/programs/continual-sync.shtml>
continual-sync(1), watchdir(1), rsync(1), glob(7)
This is free software, distributed under the ARTISTIC 2.0 license.