Skip to content

Commit

Permalink
Tweak the documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Kundert authored and Ken Kundert committed Sep 23, 2019
1 parent 4be92ca commit 40eec43
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
32 changes: 20 additions & 12 deletions doc/configuring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,19 @@ that.

It is generally better to specify *prefix* rather than *archive*, though you can
specify both if you wish. If *archive* is not specified and *prefix* is, then
*archive* is created by adding '{{now}}' to *prefix*. For example, if *prefix*
is '{host_name}-' and *archive* is not given then *archive* becomes
'{config_name}-{{now}}'. If neither *archive* or *prefix* is specified, then
'{config_name}-{{now}}' is used for *archive* and '{config_name}-' is used for
*prefix*.
*archive* is created by adding '{{now}}' to *prefix*. If *archive* is specified
but *prefix* is not, then *archive* is used as given and *prefix* is not passed
to the *prune* command. In this case you should not have multiple configurations
backup into the same repository.

For example, if *prefix* is '{config_name}-' and *archive* is not given then
*archive* becomes '{config_name}-{{now}}'. If neither *archive* or *prefix* is
specified, then '{config_name}-{{now}}' is used for *archive* and
'{config_name}-' is used for *prefix*. One would specify both *archive* and
*prefix* when you wanted to use a different format for *now*. For example::

archive = '{config_name}-{{now:%Y%m%d}}'
prefix = '{config_name}-'


Includes
Expand All @@ -122,7 +130,7 @@ or::


Composite Configurations
-------------------------
------------------------

It is possible to define composite configurations that allow you to run several
configurations at once. This might be useful if you have files that benefit,
Expand All @@ -131,19 +139,19 @@ for example, from different prune schedules.
As an example, consider having three configurations that you would like to run
all at once. You can specify these configurations as follows::

configurations = 'root1 root2 root3 root=root1,root2,root3'
configurations = 'root home lamp all=root,home,lamp'

In this case *root1*, *root2* and *root3* are simple configurations and *root*
is a composite configuration. *root1*, *root2*, and *root3* would have
configuration files whereas *root* would not.
In this case *root*, *home* and *lamp* are simple configurations and *all* is
a composite configuration. *root*, *home*, and *lamp* would have configuration
files whereas *all* would not.

You can run a specific configuration with:

emborg -c root1 extract ~/bin
emborg -c root extract ~/bin

You can run all three configurations with:

emborg -c root create
emborg -c all create

Only certain commands support composite configurations. Specifically, *create*,
*check*, *configs*, *due*, *help*, *info*, *prune*, and *version* support
Expand Down
2 changes: 2 additions & 0 deletions doc/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Here is the contents of the settings file: /root/.config/emborg/settings::

# repository settings
repository = 'backups:/mnt/backups/{host_name}-{user_name}-{config_name}'
archive = '{config_name}-{{now:%Y%m%d}}'
prefix = '{config_name}-'
compression = 'lz4'

# shared filter settings
Expand Down

0 comments on commit 40eec43

Please sign in to comment.