GNU shar utilities: 4.7 Format of the .remsync file

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 4.7 Format of the ``.remsync'` file

The ``.remsync'` file saves all the information a site needs for properly synchronizing a directory tree with remote sites. Even if it is meant to be editable using any ASCII editor, it has a very precise format and one should be very careful while modifying it directly, if ever. The ``.remsync'` file is better handled through the `remsync` program and commands.

The ``.remsync'` file is made up of statements, one per line. Each line begins with a statement keyword followed by a single `TAB`, then by one or more parameters. The keyword may be omitted, in this case, the keyword is said to be empty, and the line begins immediately with the `TAB`. After the `TAB`, if there are two parameters or more, they should all be separated with a single space. There should not be any space between the last parameter and the end of line (unless there are explicit empty parameters).

The following table gives the possible keywords. Their order of presentation in the table is also the order of appearance in the ``.remsync'` file.

`remsync`

  This statement identifies the ``.remsync'` format. The only parameter states the file format version.

`local`

  This statement should appear exactly once, and has exactly two parameters. The first parameter gives the electronic mail address the other sites should use for sending synchronization packages here. The second parameter gives the name of the local directory tree to synchronize, in absolute notation.

`remote`

  This statement may appear zero, one or more times. Each occurrence connects the synchronized directory tree to another tree on a remote site. The first parameter gives one electronic mail address where to send remote synchronization packages. The second parameter gives the name of the corresponding directory tree for this remote electronic mail address, in absolute notation.

`scan`

  This statement may appear zero, one or more times. When it does not appear at all, the whole local directory tree will always be scanned, searching for files to synchronize. When the statement appears at least once, the whole local directory tree will not be scanned, but only those files or directories appearing in one of these statements. Each `scan` statement has exactly one parameter, giving one file or directory to be studied. These are usually given relative to top directory of the local synchronization directory tree. Shell wildcards are acceptable.

`ignore`

  This statement may appear zero, one or more times. Each occurrence has one parameter giving a regular expression, according to Perl syntax for regular expressions. These regexps are applied against each file resulting from the scan. If any of the `ignore` expression matches one of resulting file, the file is discarded and is not subject to remote synchronization.

After all the statements beginning by the previous keywords, the ``.remsync'` file usually contains many statements having the empty keyword. The empty keyword statement may appear zero, one or more times. Each occurrence list one file being remotely synchronized. The first parameter gives an explicit file name, usually given relative to the top directory of the local synchronized directory tree. Shell wildcards are not acceptable.

Besides the file name parameter, there are supplementary parameters to each empty keyword statement, each corresponding to one remote statement in the ``.remsync'` file. The second parameter corresponds to the first remote, the third parameter corresponds to the second remote, etc. If there are more remote statements than supplementary parameters, missing parameters are considered to be empty.

Each supplementary parameter usually gives the last known checksum value for this particular file, as computed on its corresponding remote site. The parameter contains a dash `-` while the remote checksum is unknown. The checksum value for the local copy of the file is never kept anywhere in the ``.remsync'` file. The special value ``666'` indicates a checksum from hell, used when the remote file is known to exist, but for which contradictory information has been received from various sources.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

This document was generated by Bruce Korb on March, 25 2006 using texi2html 1.76.