~ubuntu-branches/debian/sid/obnam/sid

« back to all changes in this revision

Viewing changes to manual/fr/150-config.mdwn

  • Committer: Package Import Robot
  • Author(s): Lars Wirzenius
  • Date: 2015-07-01 18:14:49 UTC
  • Revision ID: package-import@ubuntu.com-20150701181449-taxcvqg9cviw2cxo
Tags: 1.10-1
* New upstream version.
  * Fix "restore to /tmp messes up directory perms" by preventing
    restores to a non-empty directory. (Closes: #760492)
* Add build-dependency on git.
* Drop build-dependency on texlive and building of PDF form of manual.
  Texlive is an insanely large build dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Obnam configuration files and settings
 
2
======================================
 
3
 
 
4
This chapter discusses Obnam configuration files: where they are, what
 
5
they contain, and how they are used.
 
6
 
 
7
Where is my configuration?
 
8
--------------------------
 
9
 
 
10
Obnam looks for its configuration files in a number of places:
 
11
 
 
12
* `/etc/obnam.conf`
 
13
* `/etc/obnam/*.conf`
 
14
* `~/.obnam.conf`
 
15
* `~/.config/obnam/*.conf`
 
16
 
 
17
Note that in `/etc/obnam` and `~/.config/obnam`, all files that have a
 
18
`.conf` suffix are loaded, in "asciibetical" order, which is like
 
19
alphabetical, but based on character codes rather than what humans
 
20
understand, but unlike alphabetical isn't dependent on the language
 
21
being used.
 
22
 
 
23
Any files in the list above may or may not exist. If it exists, it is
 
24
read, and then the next file is read. A setting in one file can be
 
25
overridden by a later file, if it is set there as well.
 
26
For example, `/etc/obnam.conf` might set `log-level` to `INFO`,
 
27
but `~/.obnam.conf` may then set it to `DEBUG`, if a user wants more
 
28
detailed log files.
 
29
 
 
30
The Obnam configuration files in `/etc` apply to everyone who runs
 
31
Obnam on that machine. This is important: they are not just for when
 
32
`root` runs Obnam.
 
33
 
 
34
If you want to have several Obnam configurations, for example for
 
35
different backup repositories, you need to name or place the files so
 
36
they aren't on the list above. For example:
 
37
 
 
38
* `/etc/obnam/system-backup.profile`
 
39
* `~/.config/obnam/online.profile`
 
40
* `~/.config/obnam/usbdrive.profile`
 
41
 
 
42
You would then need to specify that file for Obnam to use it:
 
43
 
 
44
    obnam --config ~/.config/obnam/usbdrive.profile`
 
45
 
 
46
If you want to not be affected by any configuration files, except
 
47
the ones you specify explicitly, you need to also use the
 
48
`--no-default-config` option:
 
49
 
 
50
    obnam --no-default-config --config ~/.obnam-is-fun.conf
 
51
 
 
52
Command line options override values from configuration files.
 
53
 
 
54
Configuration file syntax
 
55
-------------------------
 
56
 
 
57
Obnam configuration files use the [INI file] syntax, specifically
 
58
the variant implemented by the Python [ConfigParser] library.
 
59
They look like this:
 
60
 
 
61
    [config]
 
62
    log-level = debug
 
63
    log = /var/log/obnam.log
 
64
    encrypt-with = CAFEBEEF
 
65
    root = /
 
66
    one-file-system = yes
 
67
 
 
68
[INI file]: https://en.wikipedia.org/wiki/INI_file
 
69
[ConfigParser]: http://docs.python.org/2/library/configparser.html
 
70
 
 
71
Names of configuration variables are the same as the corresponding
 
72
command line options. If `--foo` is the option, then the variable in
 
73
the file is `foo`. Any command line option `--foo=bar` can be used in
 
74
a configuration file as `foo = bar`. There's are exceptions to this
 
75
(`--no-default-config`, `--config`, `--help`, and a few others), but
 
76
they're all things you wouldn't put in a configuration file anyway.
 
77
 
 
78
Every option, or setting, has a type. Mostly this doesn't matter,
 
79
unless you give it a value that isn't suitable. The two important
 
80
exceptions to this are:
 
81
 
 
82
* Boolean or yes/no or on/off settings. For example,
 
83
  `--exclude-caches` is a setting that is either turned on (when the
 
84
  option is used) or off (when it's not used). For every Boolean
 
85
  setting `--foo`, there is an option `--no-foo`. In a configuration
 
86
  files, `foo` is turned on by setting it to `yes` or `true`, and off
 
87
  by setting it to `no` or `false`.
 
88
 
 
89
* Some settings can be lists of values, such as `--exclude`. You can
 
90
  use `--exclude` as many times as you want, each time a new exclusion
 
91
  pattern is added, rather than replacing the previous patterns.
 
92
  In a configuration file, you would write all the values at once,
 
93
  separated by commas and optional spaces: for example,
 
94
  `exclude = foo, bar, baz`. In a configuration file, the previous
 
95
  list of values is replaced entirely rather than added to.
 
96
 
 
97
For a more detailed explanation of Obnam configuration file syntax,
 
98
see the **cliapp**(5) manual page on your system, or [cliapp man page]
 
99
on the WWW.
 
100
 
 
101
[cliapp man page]: http://liw.fi/cliapp/cliapp.5.txt
 
102
 
 
103
Checking what my configuration is
 
104
---------------------------------
 
105
 
 
106
Obnam can read configuration files from a number of places, and it can
 
107
be tricky to figure out what the actual configuration is. The
 
108
`--dump-config` option helps here.
 
109
 
 
110
    obnam --config ~/.obnam.fun --exclude-caches --dump-config
 
111
 
 
112
The option will tell Obnam to write out (to the standard output) a
 
113
configuration file that captures every setting, and reporting the
 
114
value that it would have if `--dump-config` weren't used.
 
115
 
 
116
This is a good way to see what the current settings are and also as
 
117
a starting point if you want to make a configuration file from
 
118
scratch.
 
119
 
 
120
Finding out all the configuration settings
 
121
------------------------------------------
 
122
 
 
123
This manual does not yet have a list of all the settings, and their
 
124
explanation. Obnam provides built-in help (run `obnam --help`) and a
 
125
manual page automatically generated from the built-in help
 
126
(run `man obnam` or see [obnam man page]). Some day, this chapter will
 
127
include an automatically generated section that explains each setting.
 
128
Until then, you're free to point fingers at Obnam's author and giggle
 
129
at his laziness.
 
130
 
 
131
[obnam man page]: http://obnam.org/obnam.1.txt