1DAR_MANAGER(1)              General Commands Manual             DAR_MANAGER(1)
2
3
4

NAME

6       dar_manager  - compiles several archives contents in a database to ease
7       file restoration
8

SYNOPSIS

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

DESCRIPTION

52       dar_manager is part of the Disk Archive suite. Its purpose is  to  sim‐
53       plify  the  restoration  of  a set of few files present in many backup,
54       full or differential. This is achieved by gathering  the  catalogue  of
55       each  archive  (this has to be done once). At any time you just have to
56       give the relative path to the files you want  to  restore,  dar_manager
57       will  call  dar with the proper options and restore the last version of
58       each file (or the last version before given date). Note  that  dar_man‐
59       ager  is especially interesting when you have removed some files by ac‐
60       cident some time ago and wish to recover them from a set  of  full  and
61       differential  backups.  It  is thus not really adapted/efficient to re‐
62       store the state a directory tree had at a  given  time,  in  particular
63       when  some  files have to be removed. For that you would better use dar
64       directly with the corresponding archive(s) up to the date for which you
65       wish to restore the state of a whole directory tree.
66
67       You  can restore any file by hand without dar_manager , but if you have
68       a lot of differential backups, you may spend a long time  to  find  the
69       archive  that  contains the last version of your files, as dar will not
70       save it if it has not changed since previous backup.  dar_manager  sim‐
71       plify  the  process by looking in its internal database, built from ar‐
72       chive "catalogues" (= table of contents).
73

OPTIONS

75       -C, --create [<path>/]<database>
76                           creates an empty database that will collect  infor‐
77                           mation  about several archives. The <database> is a
78                           filename that is required for -B option. To destroy
79                           a <database> just remove the file.
80
81       -B, --base [<path>/]<database>
82                           specify  the database to read or modify. The <data‐
83                           base> file must exist, and have a  database  struc‐
84                           ture (see -C option).
85
86       -i, --interactive   use  a  keyboard interactive text menu to do opera‐
87                           tions on the given database. So you may avoid read‐
88                           ing  the  other  options  described  in this manual
89                           page, if you wish, and just use the interactive op‐
90                           tion.  You  will  however  always have to create an
91                           empty database (-C option) and restore files  manu‐
92                           ally (-r option).
93
94       -A, --add [<path>/]<basename> [ [<path>/]<archive_basename>]
95                           add  an  archive to the database. An isolated cata‐
96                           logue can also be used only if it has been produced
97                           by  dar  version  1.2.0 or above. Why ? Because, an
98                           isolated catalogue produced by older  version  will
99                           always  tell that no files are saved in the archive
100                           of reference, in that case the solution is to  pro‐
101                           vide  the  archive  itself as argument. An optional
102                           second argument is the basename of the  archive  if
103                           it  is  different from the first argument (need for
104                           extraction of files). For example you could have an
105                           isolated  catalogue in first argument and the base‐
106                           name of the original archive (where is  stored  the
107                           data) as second argument. By default,
108
109       -9, --min-digits <num>
110                           the  slice  number zeroed padding to use to get the
111                           slices filename (for more details see dar man  page
112                           at  this  same option) dar_manager will look for an
113                           archive of reference in the command  line  used  to
114                           create  each  archive, but in some cases, it may be
115                           necessary to specify the archive name (for  example
116                           if you've changed its name).
117
118       -l, --list          displays  the  information  about the archives com‐
119                           piled in the database. In particular, a  number  is
120                           given  to  each  archive, which is required to some
121                           other option to design a particular archive  within
122                           the  database. Nothing avoids you to feed the data‐
123                           base with several archive of the  same  basename  !
124                           You  will just have to guess which one is asked un‐
125                           der this name. :-)
126
127       -D, --delete <number>[-<number>]
128                           removes an archive (or a range of archive) from the
129                           database. The number of the archive (or the min and
130                           max number or the archive range) is  correspond  to
131                           those given by the -l option. Note that all archive
132                           number greater than the one(s) to be delete will be
133                           decremented to keep continuous numbering of the ar‐
134                           chive inside the database. If a  single  number  is
135                           given (not a range), it may be also a negative num‐
136                           ber, by which it means counting from the  end.  For
137                           example,  -1 means the last archive of the base, -2
138                           the penultimate, etc.
139
140       -b, --basename <number> <new_archive_basename>
141                           this option allows you to rename the archive  base‐
142                           name (used when restoring files from it). Here too,
143                           the number may be also a negative number.
144
145       -p, --path <number> <path>
146                           this option allows you to change the location of  a
147                           given  archive (used when restoring files from it).
148                           Here too, a negative number is allowed.
149
150       -o, --options [list of option to pass to dar]
151                           Specify the option to use when  calling  dar.  Each
152                           call  erases the previous setting. Possible dar op‐
153                           tions are all the available ones except  "-x"   and
154                           simple arguments (the [list of path]) which will be
155                           added by dar_manager itself.
156
157       -d, --dar [<path>]  Set the path to dar. If no argument is  given,  dar
158                           is expected to be located in the PATH
159
160       -r, --restore [list of files or directories to restore]
161                           dar_manager  will  restore  all (an only) the given
162                           files or directories, in their latest recorded sta‐
163                           tus,  or  before the date give thanks to the -e op‐
164                           tion. If a directory is given all subfiles and sub‐
165                           directories are restored recursively in it. You can
166                           filter out some files from this recursion thanks to
167                           dar  usual  filtering option (see dar man page) you
168                           can provide beside -r using the -e option (see  be‐
169                           low). Dar_manager lead dar to remove any file, if a
170                           file is stored as having been removed at  date  re‐
171                           quested for restoration, it is simply not restored.
172                           Thus if you restore in an empty directory you  will
173                           get  all  the files and directories you provided to
174                           dar_manager in the state they have at the date  you
175                           asked.  File that did not existed at that time will
176                           not be restored. However you can  restore  over  an
177                           existing  installation,  dar will then warn you be‐
178                           fore overwriting files (see -w and -n  options  for
179                           dar)  but  will  still  not  remove files that were
180                           recorded removed from a previous archive of  refer‐
181                           ence.  Note that files listed after -r option, must
182                           never have an absolute path. They will be  restored
183                           under the directory specified with -R option of dar
184                           (passed to dar using -o or -e options), or  by  de‐
185                           fault, under the current directory.
186
187       -w, --when <date>   alters  the  -r option behavior: still restores the
188                           files in the most recent version available but only
189                           before  the  given  date  (versions  of more recent
190                           dates are ignored). The  <date>  must  respect  the
191                           following            format           [           [
192                           [year/]month/]day-]hour:minute[:second]. For  exam‐
193                           ple  "22:10"  for 10 PM past 10 or the current day,
194                           "7-22:10" for 10 PM past 10 the 7th of the  current
195                           month,  "3/07-22:10"  for the 7th of march at 22:10
196                           of the current year, "2002/03/31-14:00:00" the date
197                           of the first dar's release ;-). The given date must
198                           be in the past, of course, and is compared  to  the
199                           "last modification" date of the saved files and not
200                           to the date at which archives have been done.  Thus
201                           if  a file has been changed long ago but saved in a
202                           recent (full)  archive,  it  will  be  elected  for
203                           restoration  even for dates older than the creation
204                           of the archive. In the other way, a file saved long
205                           time ago with a mtime that was set to a date in the
206                           future will not be  elected  for  restoration  when
207                           giving the date at which was done the archive.
208
209              Note  that  the provided date is relative to the system timezone
210              which is overriden if the TZ environement variable is  set  (see
211              tzselect(1) for more details)
212
213       -e, --extra <options>
214                           pass some more options to dar. While the -o options
215                           takes all that follows on the command line as argu‐
216                           ment  to  pass  to dar and write these in the data‐
217                           base, the -e option does not alter the database and
218                           has  only one argument. In other words, if you need
219                           to pass several options to dar through the  use  of
220                           the  -e  option,  you  need  to  use quotes (simple
221                           quotes ' or double quotes ") to enclose  these  op‐
222                           tions. Example:
223
224                     dar_manager  -B  database.dmd -e "-w -v -p -b -r -H 1" -r
225                     some/files
226
227              while using -o option you must not use quotes:
228
229                     dar_manager -B database.dmd -o -w -v -p -b -r -H 1
230
231       -u, --used <number> list the files that the given archive owns as  last
232                           version available. Thus when no file is listed, the
233                           given archive is no more useful  in  database,  and
234                           can  be  removed safely (-D option). If <number> is
235                           zero, all available file  are  listed,  the  status
236                           provided  for  each file present in the database is
237                           the most recent status. A negative  number  is  al‐
238                           lowed for this option (see -D option for details).
239
240       -f, --file <file>   displays  in which archive the given file is saved,
241                           and what are  the  modification  date  (mtime)  and
242                           change date (ctime).
243
244       -s, --stats         show  the  number  of most recent files by archive.
245                           This helps to determine which archive can be safely
246                           removed from the database.
247
248       -m, --move <number> <number>
249                           changes  the order of archives in the database. The
250                           first number is the number of the archive to  move,
251                           while  the  second  is  the  place where it must be
252                           shifted to.
253
254                           Archive order is important:  An  old  archive  must
255                           have  a smaller index than a recent archive. If you
256                           add archive to a database in the  order  they  have
257                           been created all should be fine. Else if a file has
258                           a more recent version in an archive which index  is
259                           smaller,  a  warning will be issued (unless -ai op‐
260                           tion is used). This can occur  if  by  mistake  you
261                           added an archive to the database in the wrong order
262                           (old archive added after a  recent  one),  in  that
263                           case  simply  using  the -m option will let you fix
264                           this mistake. If instead the problem is relative to
265                           a  single file (or a small set of file), you should
266                           wonder why this file has its modification date  al‐
267                           tered  in  a  way that it pretends to be older than
268                           its really is. Checking for the signs of a  rootkit
269                           may be a good idea.
270
271       -c, --check         check  the  database consistency, in particular the
272                           date ordering is verified and  warning  are  issued
273                           for each file having more recent version located in
274                           an archive with a smaller index  inside  the  data‐
275                           base. -ai option makes -c option useless.
276
277       -N, --ignore-options-in-base
278                           Do  not  use  the  options  stored in database when
279                           calling dar for restoration. This  option  is  only
280                           useful  while restoring files from dar_manager, ei‐
281                           ther directly (-r option) or using a batch file (-@
282                           option, see below).
283
284       -k, --ignore-when-removed
285                           By default, dar_manager does not ask dar to restore
286                           file that have been removed at the  requested  date
287                           (or  in the latest state available). This is useful
288                           for example to restore a directory in the state  it
289                           has  at  a  given  date (only files that existed at
290                           that time are restored). However when you  want  to
291                           restore a file that has been destroyed by accident,
292                           you need to use -k option so you don't have to  de‐
293                           termine  at  which  date that file existed to be be
294                           able to ask dar_manager to restore that file in the
295                           state  it  had before that date. In other words, -k
296                           option gives a  behavior  of  dar_manager  backward
297                           compatible with dar_manager released beside version
298                           2.3.x of dar.
299
300       -ai, --alter=ignore-order
301                           avoid dar_manager to issue a warning for each  file
302                           not following a chronological order of modification
303                           date when the archive number  in  the  database  is
304                           growing.
305
306       -@, --batch <filename>
307                           allows  you  to  do  several  operations on a given
308                           database. All operations are defined  in  the  pro‐
309                           vided  <filename> and refer to the same database as
310                           defined by the -B  switch  on  command  line.  This
311                           batch  file,  must thus not contain neither -B, -C,
312                           -i or -ai option (-ai are global to the batch oper‐
313                           ation).  The batch file expected layout is one com‐
314                           mand per line, thus several arguments (like  -l  -v
315                           for  example) may take place on a given line of the
316                           file (-v can be found both on command line for ver‐
317                           bose  output  about  the  batch operation steps, as
318                           well as inside the batch file for verbose output of
319                           a  particular batched command). Arguments are sepa‐
320                           rated by  spaces  or  tabs,  other  characters  are
321                           passed  as-is. In consequence, you should only need
322                           to use quotes (using " or ') if you intend  to  use
323                           an argument containing space. Last, comments may be
324                           placed on any line beginning by  a  hash  character
325                           (#).
326
327       -z, --compression <algo>
328                           Only  available  while  creating a database (-C op‐
329                           tion), this option let you set the compression  al‐
330                           gorithm  used to store the database in file. By de‐
331                           fault gzip is use, but you can use  "none"  for  no
332                           compression, "bzip2", "xz" and "lzo" for other com‐
333                           pression algorithm. Compression level selection may
334                           be  added  in  the  future  (level 9 is used inter‐
335                           nally).
336
337       -Q                  Do not display  any  message  on  stderr  when  not
338                           launched from a terminal (for example when launched
339                           from an at job or crontab). Remains that any  ques‐
340                           tion  to  the  user  will be assumed a 'no' answer,
341                           which most of the time will abort the program.
342
343       -v, --verbose       displays additional information about  what  it  is
344                           doing.
345
346       -h, --help          display help usage
347
348       -V, --version       display software version
349
350

EXIT CODES

352       dar_manager exits with the following code:
353
354       0         Operation successful.
355
356       1         see dar manual page for signification
357
358       2         see dar manual page for signification
359
360       3         see dar manual page for signification
361
362       5         see dar manual page for signification
363
364       7         see dar manual page for signification
365
366       8         see dar manual page for signification
367
368       11 and above
369                 dar
370                  called  from  dar_manager  has  exited with non zero status.
371                 Subtract 10 to this exit code to get dar's exit code.
372
373

SIGNALS

375       dar_manager acts like dar (see dar man page for list of signals),  upon
376       certain signal reception dar aborts cleanly
377
378

SEE ALSO

380       dar(1), dar_xform(1), dar_slave(1), dar_cp(1), dar_split(1)
381
382

LIMITATIONS

384       at  most  65534  archives  can  be  compiled in a given database, which
385       should be enough for most users. Dar_manager does not support encrypted
386       archives  for  now and archive cannot neither be encrypted. See the FAQ
387       for a workaround.
388
389

KNOWN BUGS

391       http://sourceforge.net/p/dar/bugs/
392
393

AUTHOR

395       http://dar.linux.free.fr/
396       Denis Corbin
397       France
398       Europe
399
400
401
4023rd Berkeley Distribution     September 5th, 2020               DAR_MANAGER(1)
Impressum