1DAR_MANAGER(1) General Commands Manual DAR_MANAGER(1)
2
3
4
6 dar_manager - compiles several archives contents in a database to ease
7 file restoration
8
10 dar_manager [-v] -C [<path>/]<database> [-z <algo>]
11
12 dar_manager [-v] -B [<path>/]<database> -A [<path>/]<basename> [-9
13 <min-digits>] [[<path>/]<archive_basename>]
14
15 dar_manager [-v] -B [<path>/]<database> -l
16
17 dar_manager [-v] -B [<path>/]<database> -D <number>[-<number>]
18
19 dar_manager [-v] -B [<path>/]<database> -b <number> <new_archive_base‐
20 name>
21
22 dar_manager [-v] -B [<path>/]<database> -p <number> <path>
23
24 dar_manager [-v] -B [<path>/]<database> -o [list of options to pass to
25 dar]
26
27 dar_manager [-v] -B [<path>/]<database> -d [<path to dar command>]
28
29 dar_manager [-v] -B [<path>/]<database> [-N] [-k] [-w <date>] [-e "<ex‐
30 tra options to dar>"] -r [list of files to restore]
31
32 dar_manager [-v] -B [<path>/]<database> -u <number>
33
34 dar_manager [-v] -B [<path>/]<database> -f file
35
36 dar_manager [-v] -B [<path>/]<database> -s
37
38 dar_manager [-v] -B [<path>/]<database> -m <number> <number>
39
40 dar_manager [-v] -B [<path>/]<database> -c
41
42 dar_manager [-v] -B [<path>/]<database> -i
43
44 dar_manager [-v] -B [<path>/]<database> -@ { <filename> | "-" }
45
46 dar_manager -h
47
48 dar_manager -V
49
50
52 dar_manager is part of the Disk Archive suite. Its purpose is to sim‐
53 plify the restoration of a set of files present in many backup, full or
54 differential, eventually composed of a set of binary delta patches.
55 This is achieved by gathering the catalogue of each archive (this has
56 to be done once). Then, at any time you just have to give the relative
57 path to the files you want to restore, dar_manager will call dar with
58 the proper options and restore the last version of each file (or the
59 last version before given date). Note that dar_manager is especially
60 interesting when you have removed some files by accident some time ago
61 and wish to recover them from a set of full and differential backups.
62 It is thus not really adapted/efficient to restore the state a full
63 system had at a given time, in particular when some files have to be
64 removed. For that you would better use dar directly with the corre‐
65 sponding archive(s) up to the date for which you wish to restore the
66 state of your Unix system.
67
68 You can restore any file by hand without dar_manager , but if you have
69 a lot of differential backups, you may spend a long time to find the
70 archive that contains the last version of your files. dar_manager sim‐
71 plify the process by looking in its internal database, built from ar‐
72 chive "catalogues" (= table of contents) it has been fed with.
73
74
76 -C, --create [<path>/]<database>
77 creates an empty database that will collect infor‐
78 mation about several archives. The <database> is a
79 filename that is required for -B option. To destroy
80 a <database> just remove the file.
81
82 -B, --base [<path>/]<database>
83 specify the database to read or modify. The <data‐
84 base> file must exist, and have a database struc‐
85 ture (see -C option).
86
87 -i, --interactive use a keyboard interactive text menu to do opera‐
88 tions on the given database. So you may avoid read‐
89 ing the other options described in this manual
90 page, if you wish, and just use the interactive op‐
91 tion. You will however always have to create an
92 empty database (-C option) and restore files manu‐
93 ally (-r option).
94
95 -A, --add [<path>/]<basename> [ [<path>/]<archive_basename>]
96 add an archive to the database. An isolated cata‐
97 logue can also be used only if it has been produced
98 by dar version 1.2.0 or above. Why ? Because, an
99 isolated catalogue produced by older version will
100 always tell that no files are saved in the archive
101 of reference, in that case the solution is to pro‐
102 vide the archive itself as argument. An optional
103 second argument is the basename of the archive if
104 it is different from the first argument (need for
105 extraction of files). For example you could have an
106 isolated catalogue in first argument and the base‐
107 name of the original archive (where is stored the
108 data) as second argument. By default,
109
110 -9, --min-digits <num>
111 the slice number zeroed padding to use to get the
112 slices filename (for more details see dar man page
113 at this same option) dar_manager will look for an
114 archive of reference in the command line used to
115 create each archive, but in some cases, it may be
116 necessary to specify the archive name (for example
117 if you've changed its name).
118
119 -l, --list displays the information about the archives com‐
120 piled in the database. In particular, a number is
121 given to each archive, which is required to some
122 other option to design a particular archive within
123 the database. Nothing avoids you to feed the data‐
124 base with several archive of the same basename !
125 You will just have to guess which one is asked un‐
126 der this name. :-)
127
128 -D, --delete <number>[-<number>]
129 removes an archive (or a range of archive) from the
130 database. The number of the archive (or the min and
131 max number or the archive range) is correspond to
132 those given by the -l option. Note that all archive
133 number greater than the one(s) to be delete will be
134 decremented to keep continuous numbering of the ar‐
135 chive inside the database. If a single number is
136 given (not a range), it may be also a negative num‐
137 ber, by which it means counting from the end. For
138 example, -1 means the last archive of the base, -2
139 the penultimate, etc.
140
141 -b, --basename <number> <new_archive_basename>
142 this option allows you to rename the archive base‐
143 name (used when restoring files from it). Here too,
144 the number may be also a negative number.
145
146 -p, --path <number> <path>
147 this option allows you to change the location of a
148 given archive (used when restoring files from it).
149 Here too, a negative number is allowed.
150
151 -o, --options [list of option to pass to dar]
152 Specify the option to use when calling dar. Each
153 call erases the previous setting. Possible dar op‐
154 tions are all the available ones except "-x" and
155 simple arguments (the [list of path]) which will be
156 added by dar_manager itself.
157
158 -d, --dar [<path>] Set the path to dar. If no argument is given, dar
159 is expected to be located in the PATH
160
161 -r, --restore [list of files or directories to restore]
162 dar_manager will restore all (an only) the given
163 files or directories, in their latest recorded sta‐
164 tus, or before the date give thanks to the -e op‐
165 tion. If a directory is given all subfiles and sub‐
166 directories are restored recursively in it. You can
167 filter out some files from this recursion thanks to
168 dar usual filtering option (see dar man page) you
169 can provide beside -r using the -e option (see be‐
170 low). Dar_manager lead dar to remove any file, if a
171 file is stored as having been removed at date re‐
172 quested for restoration, it is simply not restored.
173 Thus if you restore in an empty directory you will
174 get all the files and directories you provided to
175 dar_manager in the state they have at the date you
176 asked. File that did not existed at that time will
177 not be restored. However you can restore over an
178 existing installation, dar will then warn you be‐
179 fore overwriting files (see -w and -n options for
180 dar) but will still not remove files that were
181 recorded removed from a previous archive of refer‐
182 ence. Note that files listed after -r option, must
183 never have an absolute path. They will be restored
184 under the directory specified with -R option of dar
185 (passed to dar using -o or -e options), or by de‐
186 fault, under the current directory.
187
188 -w, --when <date> alters the -r option behavior: still restores the
189 files in the most recent version available but only
190 before the given date (versions of more recent
191 dates are ignored). The <date> must respect the
192 following format [ [
193 [year/]month/]day-]hour:minute[:second]. For exam‐
194 ple "22:10" for 10 PM past 10 or the current day,
195 "7-22:10" for 10 PM past 10 the 7th of the current
196 month, "3/07-22:10" for the 7th of march at 22:10
197 of the current year, "2002/03/31-14:00:00" the date
198 of the first dar's release ;-). The given date must
199 be in the past, of course, and is compared to the
200 "last modification" date of the saved files and not
201 to the date at which archives have been done. Thus
202 if a file has been changed long ago but saved in a
203 recent (full) archive, it will be elected for
204 restoration even for dates older than the creation
205 of the archive. In the other way, a file saved long
206 time ago with a mtime that was set to a date in the
207 future will not be elected for restoration when
208 giving the date at which was done the archive.
209
210 Note that the provided date is relative to the system timezone
211 which is overriden if the TZ environement variable is set (see
212 tzselect(1) for more details)
213
214 -e, --extra <options>
215 pass some more options to dar. While the -o options
216 takes all that follows on the command line as argu‐
217 ment to pass to dar and write these in the data‐
218 base, the -e option does not alter the database and
219 has only one argument. In other words, if you need
220 to pass several options to dar through the use of
221 the -e option, you need to use quotes (simple
222 quotes ' or double quotes ") to enclose these op‐
223 tions. Example:
224
225 dar_manager -B database.dmd -e "-w -v -p -b -r -H 1" -r
226 some/files
227
228 while using -o option you must not use quotes:
229
230 dar_manager -B database.dmd -o -w -v -p -b -r -H 1
231
232 -u, --used <number> list the files that the given archive owns as last
233 version available. Thus when no file is listed, the
234 given archive is no more useful in database, and
235 can be removed safely (-D option). If <number> is
236 zero, all available file are listed, the status
237 provided for each file present in the database is
238 the most recent status. A negative number is al‐
239 lowed for this option (see -D option for details).
240
241 -f, --file <file> displays in which archive the given file is saved,
242 and what are the modification date (mtime) and
243 change date (ctime).
244
245 -s, --stats show the number of most recent files by archive.
246 This helps to determine which archive can be safely
247 removed from the database.
248
249 -m, --move <number> <number>
250 changes the order of archives in the database. The
251 first number is the number of the archive to move,
252 while the second is the place where it must be
253 shifted to.
254
255 Archive order is important: An old archive must
256 have a smaller index than a recent archive. If you
257 add archive to a database in the order they have
258 been created all should be fine. Else if a file has
259 a more recent version in an archive which index is
260 smaller, a warning will be issued (unless -ai op‐
261 tion is used). This can occur if by mistake you
262 added an archive to the database in the wrong order
263 (old archive added after a recent one), in that
264 case simply using the -m option will let you fix
265 this mistake. If instead the problem is relative to
266 a single file (or a small set of file), you should
267 wonder why this file has its modification date al‐
268 tered in a way that it pretends to be older than
269 its really is. Checking for the signs of a rootkit
270 may be a good idea.
271
272 -c, --check check the database consistency, in particular the
273 date ordering is verified and warning are issued
274 for each file having more recent version located in
275 an archive with a smaller index inside the data‐
276 base. -ai option makes -c option useless.
277
278 -N, --ignore-options-in-base
279 Do not use the options stored in database when
280 calling dar for restoration. This option is only
281 useful while restoring files from dar_manager, ei‐
282 ther directly (-r option) or using a batch file (-@
283 option, see below).
284
285 -k, --ignore-when-removed
286 By default, dar_manager does not ask dar to restore
287 file that have been removed at the requested date
288 (or in the latest state available). This is useful
289 for example to restore a directory in the state it
290 has at a given date (only files that existed at
291 that time are restored). However when you want to
292 restore a file that has been destroyed by accident,
293 you need to use -k option so you don't have to de‐
294 termine at which date that file existed to be be
295 able to ask dar_manager to restore that file in the
296 state it had before that date. In other words, -k
297 option gives a behavior of dar_manager backward
298 compatible with dar_manager released beside version
299 2.3.x of dar.
300
301 -ai, --alter=ignore-order
302 avoid dar_manager to issue a warning for each file
303 not following a chronological order of modification
304 date when the archive number in the database is
305 growing.
306
307 -@, --batch <filename>
308 allows you to do several operations on a given
309 database. All operations are defined in the pro‐
310 vided <filename> and refer to the same database as
311 defined by the -B switch on command line. This
312 batch file, must thus not contain neither -B, -C,
313 -i or -ai option (-ai are global to the batch oper‐
314 ation). The batch file expected layout is one com‐
315 mand per line, thus several arguments (like -l -v
316 for example) may take place on a given line of the
317 file (-v can be found both on command line for ver‐
318 bose output about the batch operation steps, as
319 well as inside the batch file for verbose output of
320 a particular batched command). Arguments are sepa‐
321 rated by spaces or tabs, other characters are
322 passed as-is. In consequence, you should only need
323 to use quotes (using " or ') if you intend to use
324 an argument containing space. Last, comments may be
325 placed on any line beginning by a hash character
326 (#).
327
328 -z, --compression <algo>[:<level>]
329 Available creating or modifying a database content
330 (-C, -A, -D, -m, -i, -L options), this option let
331 you set the compression algorithm and eventually
332 the compression level to use when the database is
333 wrote to file. By default gzip:9 is use, but you
334 can use "none" for no compression, "bzip2", "xz"
335 and "lzo" and other compression algorithms (see -z
336 option in dar's man page for an up to date list of
337 available algorithms). Note: this option is only
338 needed if you want to *change* the compression al‐
339 gorithm or level. Once defined, either at database
340 creation time using -C option, or modified after‐
341 ward, the compression scheme is stored in the data‐
342 base header and used for writing down database back
343 to file.
344
345 -Q Do not display any message on stderr when not
346 launched from a terminal (for example when launched
347 from an at job or crontab). Remains that any ques‐
348 tion to the user will be assumed a 'no' answer,
349 which most of the time will abort the program.
350
351 -v, --verbose displays additional information about what it is
352 doing.
353
354 -h, --help display help usage
355
356 -V, --version display software version
357
358
360 dar_manager exits with the following code:
361
362 0 Operation successful.
363
364 1 see dar manual page for signification
365
366 2 see dar manual page for signification
367
368 3 see dar manual page for signification
369
370 5 see dar manual page for signification
371
372 7 see dar manual page for signification
373
374 8 see dar manual page for signification
375
376 11 and above
377 dar
378 called from dar_manager has exited with non zero status.
379 Subtract 10 to this exit code to get dar's exit code.
380
381
383 dar_manager acts like dar (see dar man page for list of signals), upon
384 certain signal reception dar aborts cleanly
385
386
388 dar(1), dar_xform(1), dar_slave(1), dar_cp(1), dar_split(1)
389
390
392 at most 65534 archives can be compiled in a given database, which
393 should be enough for most users. Dar_manager does not support encrypted
394 archives for now and archive cannot neither be encrypted. See the FAQ
395 for a workaround.
396
397
399 http://sourceforge.net/p/dar/bugs/
400
401
403 http://dar.linux.free.fr/
404 Denis Corbin
405 France
406 Europe
407
408
409
4103rd Berkeley Distribution April 24th, 2021 DAR_MANAGER(1)