1AA_ARCH_SPEC(5) AutoArchive AA_ARCH_SPEC(5)
2
3
4
6 aa_arch_spec - Archive Specification File
7
9 ~/.config/aa/archive_specs/*.aa
10
12 Archive specification file contains all information needed for creation
13 of a single archive.
14
16 Options in the .aa file are divided into sections. A section begins
17 with the section name enclosed in square brackets. It contains vari‐
18 ables which represents the options.
19
20 Variables are written in the option-name = value form, one variable per
21 line. Boolean values are written as yes and no. For path values,
22 tilde (~) is expanded to the user's home. Form option-name = can be
23 used to specify a variable with undefined value.
24
25 Values of include-files and exclude-files options that contains spaces
26 has to be enclosed in double quotes (""). They may contain standard
27 shell wildcards.
28
29 When specifying the value it is possible to refer to other variables
30 from the same file using the form %(variable-name)s or variables from
31 an external file using the form @(external-name.variable-name) where
32 external-name is reference which has to be defined in [External] sec‐
33 tion.
34
35 Lines beginning with # or ; are ignored and may be used for comments.
36
37 Three sections are valid: [External, [Archive] (optional) and [Con‐
38 tent].
39
40 Section [External]
41 This section contains definition of external references. Each refer‐
42 ence is put on a single line. They can be specified by two forms: as a
43 single variable or as a variable = path pair.
44
45 If single variable is specified it refers to archive specification file
46 of the same name as the variable but without the '.aa' extension. The
47 file is searched in the archive specifications directory.
48
49 The variable = path form allows to refer a file from an arbitrary loca‐
50 tion by specifying its absolute or relative path. Paths are relative
51 to the directory of the original file. In both cases variable name is
52 used in the reference. See Examples for the example of the .aa file
53 with external references.
54
55 Section [Archive]
56 This section can contain configuration options which are, when speci‐
57 fied, overriding the ones specified in configuration files and command
58 line.
59
60 Options valid in the [Archive] section:
61
62 · archiver
63
64 · compression-level
65
66 · dest-dir
67
68 · overwrite-at-start
69
70 · incremental
71
72 · restarting
73
74 · restart-after-level
75
76 · restart-after-age
77
78 · full-restart-after-count
79
80 · full-restart-after-age
81
82 · max-restart-level-size
83
84 · remove-obsolete-backups
85
86 · keep-old-backups
87
88 · number-of-old-backups
89
90 · command-before-backup
91
92 · command-after-backup
93
94 See aa(1) for their description.
95
96 Section [Content]
97 This section contains options specific to an archive. All options
98 except name are required.
99
100 Options valid in the [Content] section:
101
102 · name
103
104 Archive name. Created backup will be named according value of
105 this variable plus appropriate extension. It is optional; default
106 value is the name of the .aa file without the extension.
107
108 · path
109
110 Path to archive root. All paths and file names specified in the
111 same archive specification file will be relative to this path. It
112 will be also the root of the created archive.
113
114 · include-files
115
116 List of space separated file or directory names to backup. Paths
117 here are relative to the path specified in path variable above.
118 Starting forward slash (/) from absolute paths as well as parent
119 directory tokens (..) will be ignored.
120
121 · exclude-files
122
123 List of space separated file or directory names to be excluded
124 from the backup. Use exclude-files = to specify that no files
125 should be excluded. Similarly to include-files these paths are
126 relative to path.
127
129 In this example we want to configure archive for "/data" directory
130 backups. There will be two locations where backups are stored. One is
131 a large capacity NAS mounted at "/mnt/nas", the other is a smaller
132 external disk mounted at "/mnt/backup_disk".
133
134 Below is content of two archive specification files for this use case.
135 The first one configures archive "data-nas" for NAS storage destina‐
136 tion. Second file configures archive "data-disk" for external disk
137 location. It is taking all values except dest-dir from the
138 "data-nas.aa" file via external references. Additionally it excludes
139 "videos" directory so that backup will fit to disk.
140
141 # ------ begin of data-nas.aa ------
142 [Content]
143 path = /
144 include-files = data-nas
145 exclude-files =
146
147 [Archive]
148 dest-dir = /mnt/nas
149 # ------ end of data-nas.aa ------
150
151 # ------ begin of data-disk.aa ------
152 [External]
153 data-nas
154
155 [Content]
156 path = @(data-nas.path)
157 include-files = @(data-nas.include-files)
158 exclude-files = @(data-nas.exclude-files) videos
159
160 [Archive]
161 dest-dir = /mnt/backup_disk
162 # ------ end of data-disk.aa ------
163
164 Specifying path to the external file
165 Would the "data-nas.aa" file in previous example be in a different
166 directory than archive specifications directory its path had to be
167 specified:
168
169 # ------ begin of data-disk.aa ------
170 [External]
171 data-nas = /path/to/data-nas.aa
172
173 [Content]
174 # ...
175 # ------ end of data-disk.aa ------
176
178 This program is free software: you can redistribute it and/or modify it
179 under the terms of the GNU General Public License version 3 as pub‐
180 lished by the Free Software Foundation.
181
182 This program is distributed in the hope that it will be useful, but
183 WITHOUT ANY WARRANTY; without even the implied warranty of MER‐
184 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
185 Public License for more details.
186
187 You should have received a copy of the GNU General Public License along
188 with this program. If not, see <http://www.gnu.org/licenses/>.
189
191 aa(1), aa.conf(5)
192
194 2003 - 2017, Robert Cernansky
195
196
197
198
1991.4.1 Sep 22, 2017 AA_ARCH_SPEC(5)