Ugarit
Documentation
Not logged in

.ugarit files

By default, Ugarit will vault everything it finds in the filesystem tree you tell it to snapshot. However, this might not always be desired; so we provide the facility to override this with .ugarit files, or global rules in your .conf file.

Note: All of this only applies to snapshots. Archive mode imports are not affected by .ugarit files, or global rules.

Note: The syntax of these files is provisional, as I want to experiment with usability, as the current syntax is ugly. So please don't be surprised if the format changes in incompatible ways in subsequent versions!

In quick summary, if you want to ignore all files or directories matching a glob in the current directory and below, put the following in a .ugarit file in that directory:

(* (glob "*~") exclude)

You can write quite complex expressions as well as just globs. The full set of rules is:

Also, you can override a previous exclusion with an explicit include in a lower-level directory:

(* (glob "*~") include)

You can bind rules to specific directories, rather than to "this directory and all beneath it", by specifying an absolute or relative path instead of the `*`:

("/etc" (name "passwd") exclude)

If you use a relative path, it's taken relative to the directory of the .ugarit file.

You can also put some rules in your .conf file, although relative paths are illegal there, by adding lines of this form to the file:

(rule * (glob "*~") exclude)