File: presentation.html

package info (click to toggle)
dar 2.8.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,024 kB
  • sloc: cpp: 86,219; sh: 6,978; ansic: 895; makefile: 489; python: 242; csh: 115; perl: 43; sed: 16
file content (405 lines) | stat: -rw-r--r-- 16,248 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <link href="style.css" rel="stylesheet">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
    <title>Dar's Documentation - General Presentation</title>
  </head>
  <body>

    <div class=top>
      <img alt="Dar Documentation" src="dar_s_doc.jpg" style="float:left;">
      <h1>Dar Presentation</h1>
    </div>

    <h2>General Presentation</h2>

    <p>
      Dar is a command-line software aimed to backup and archiving large live filesystems.
      It is a <b>filesystem independent</b> and
      <b>cross platform</b> tool.
      But, Dar is not a boot loader, nor it is an operating system.
      It does not create nor format partitions, but it can restore a full
      filesystem into a larger or a shorter partition, from one partition to
      several ones, (or the opposite from several to one partition), from a filesystem type to another
      filesystem type (ext2/3/4 to reiserFS for example).
    </p>

    <dl>
      <dt class=void>Saves all data and metadata</dt><dd>
	<ul>
	  <li>
	    it can save and restore hard-linked of any inodes type (hard linked plain files,
	    sockets, char/block devices or even hard linked symlinks (!)),*
	  </li>
	  <li>
	    Solaris's Door files,
	  </li>
	  <li>
	    it takes care of Extended Attributes (Linux,
	    MacOS, ...).
	  </li>
	  <li>
	    MaCOS X file forks
	  </li>
	  <li>
	    ACL (Linux, Solaris,...)
	  </li>
	  <li>
	    It can also detect and restore sparse files, even when the
	    underlying filesystem does not support them, leading
	    to an additional gain in backup space requirement, but mostly
	    at restoration time a disk space optimization that garanty you
	    always be able to restore you backup on a volume of same space
	    (which is not true for backup tools that ignore howsparse file
	    are stored on filesytems)
	  </li>
	</ul>
      </dd>

      <dt class=void>Suitable for Live filesystem backup</dt><dd>
        Thanks to its ability to detect file change during backup it can
        retry the backup of a particular file, but has also some mechanism
        that let the user define some actions for before and after saving
        a given type of file, before or after entering a given directory,
        and so on. Such action can be a simple user script or a more complex
	executable, there is no constraint.
      </dd>

      <dt class=void>Embedded Compression</dt><dd>
	Of course backup can be compressed with a large variety of protocols
	(gzip, bzip2, lzma/xz, lzo, zstd, lz4, and more to come), but
	the compression is done per file, leading to a great backup file
	robustness at the cost of unoticeable degradation of the compression
	ratio. But doing let you tell <i>dar</i> which file to compress and
	which one not trying to, saving a lot of CPU cycles.
      </dd>

      <dt class=void>Embedded Encryption</dt><dd>
	Strong encryption is available with several well known and reputed
	algorithms (blowfish, aes, twofish, serpent, camellia... but also
	by mean of public/private keys integrating GPG encrytion and signing),
	securing your data is not only a matter of ciphering algorithm, it is also
	a matter of protection against code book/dictionnary attack. For that
	purpose, when encryption is activated, data is <i>floating</i> inside
	the archive at a random position, thanks to two <i>elastic buffers</i>
	one added at the beginning of the archive, the other at the end. Last
	a KDF function with salt and parametrable iteration count increase the
	strength of the human provided key lead the encryption to use a different
	key even when the human provide the same password/passphrase for two
	different backups.
      </dd>

      <dt class=void>Cloud compatible backup tool</dt><dd>
	in addition to embedded encrytion, <i>dar</i> can directly use
	SSH/SFTP or FTP to write and read your backup to a remote storage
	(Cloud, NAS,...), without requiring any local storage. You can also
	leverage the possibily to split a backup in files of given size
	(called <b>slices</b>) to store your backup on removable storage
	(tapes, disks,...) even low end Blue-Ray, DVD-RW, CD-RW, ...
	or floppies (!) if you still have
	them... In that context it may be interesting to also leverage the
	easy integration of <i>dar</i> with <i>Parchive</i> to not only
	detect corruption and prevent restoring a corrupted system unnoticed,
	but also to repair your backup.
      </dd>

      <dt class=void>Many backup flavors available</dt><dd>
	Dar can perform <b>full backup</b><sup>1</sup>, <b>incremental backup</b><sup>2</sup>,
	<b>differential backup</b><sup>3</sup> and
	<b>decremental backup</b><sup>4</sup>.
	It also records files that have been removed since the last backup
	was made, leading the restoration of a system to get the exact same state
	it was at the time of the differential/incremental/decremental backup (removing files that
	ought to be removed, adding files that ought to be added and modifing files
	as expected).
      </dd>

      <dt class=void>Binary Delta</dt><dd>
	For differential and incremental backups, you can also leverage the <b>binary delta</b>
	which leads <i>dar</i> to create patch of large files when they change instead of saving them
	all at once even if a few bytes changed (mailboxes, and so on.). A
	filtering mechanism let you decide which file can be saved as patch when they change
	and which one will always be saved as a whole when they change.
      </dd>

      <dt class=void>Easy automation</dt><dd>
	User commands and scripts can be run from dar at each new slice
	boundary, but also before and after saving some specified type of
	files and directories. It also provides a
	<b>documented API and Python binding</b>.
      </dd>

      <dt class=void>Good quality software</dt><dd>
	Dar was born in 2002 and thanks to its modular source code
	and highly abstracted datastructures, the many
	features that were added since then, never lead the developper
	to touch already existing features for that.
	Modularity and abstraction are the two pilars of the dar/libdar
	quality.
      </dd>
    </dl>

    <h2><i>Dar</i> is easy to use</h2>
    <p>
      While dar/libdar provide a lot of features we will not mention here,
      you can use dar without having the knowledge of all of them. In its
      most simple form, dar can be used only with few options, here follows
      some example of use, that should not need additional explanations:
    </p>

    <dl>
      <dt class=void>Backing up all the <code>/usr</code> directory:</dt><dd>
	<br/>
	<code class=block>
	  dar --create my_backup --fs-root / --go-into usr
	</code>
	<br/>
      </dd>
      <dt class=void>Restoration (restoring <code>/usr</code> in a alternate directory):</dt><dd>
	<br/>
	<code class=block>
	  dar --extract my_backup --fs-root /some/where/else
	</code>
	<br/>
      </dd>
      <dt class=void>Testing backup sanity:</dt><dd>
	<br/>
	<code class=block>
	  dar --test my_backup
	</code>
	<br/>
      </dd>
      <dt class=void>Comparing a backup content with the existing filesystem:</dt><dd>
	<br/>
	<code class=block>
	  dar --diff my_backup --fs-root /
	</code>
	<br/>
      </dd>
    </dl>

    <h2><i>Dar</i> is well documented</h2>
    <p>
      A big effort has been made on documentation, but does not mean you have
      to read it all to be able to use <i>dar</i>, as this one is very easy to use:
    </p>

    <ul>
      <li>
	most needs
	are covered by the <a href="Tutorial.html">tutorial</a>
	or <a href="mini-howto/index.html">mini-howto</a>
      </li>
      <li>
	and for direct explanation of common questions by
	the <a href="FAQ.html">FAQ</a>.
      </li>
      <li>
	Then, if you like or if you need, you can also look at the
	detailed <a href="man/index.html">man pages</a>
	for a particular feature (These man documents are the
	reference for each command-line tool you will get very
	detailed explanations).
      </li>
      <li>
	You may also find some help on the
	<a href="http://lists.sourceforge.net/lists/listinfo/dar-support">
	  dar-support mailing-list
	</a> where a bit more than a hundred of
	subscribed users can help you.
      </li>
    </ul>

    <p>
      Dar's documentation is big because it also includes all that may
      be useful to know how to use libdar, which is intended for developers of
      external application relying on this library. For those even more
      curious there is also the documentation about dar's internals: libdar's
      structure, archive format, which can ease the understanding of the
      magic that makes all this working and gives a better understanding of
      dar/libdar code, which is written in C++. But, no, you do not need to
      read all this to just use dar! ;-)
    </p>

    <p>
      Follows an <a href="Features.html">abstracted list of features</a> if
      you want to know more about dar/libdar from high level point of view
    </p>

    <h2><a name="external_tools">Known Projects relying on dar or libdar</a></h2>


    <p>Projects in <b>alphabetical</b> order:</p>

    <ul>
      <li>
	<a href="http://www.boomerangsworld.de/cms/avfs/extfs?lang=en">AVFS</a>
	is virtual file system layer for transparently accessing the content
	of archives and remote directories just like local files.
      </li>
      <li>
	<a href="http://www.rgrjr.com/linux/backup.pl.html">backup.pl</a>
	script by Bob Rogers, creates and verifies a backup using dump/restore
	or using dar
      </li>
      <li>
	<a href="http://sourceforge.net/projects/baras">Baras</a> by Aaron D.
	Marasco it a rewriting in Perl of SaraB.
      </li>

      <li>
        <a href="https://github.com/per2jensen/dar-backup">dar-backup</a> by
        Per Jensen, to automate and simplify the use of dar with redundancy,
        remote backup, backup testing after transfer and many other interesting
        features, like for example the <i>backup definitions</i> and logs management
      </li>

      <li>
        <span style="font-weight: bold; color: red;">
          new in 2025:
        </span>
        <a href="https://github.com/per2jensen/dar-backup/tree/main/v2">dar-backup v2</a> also by
        Per Jensen, is a reimplementation in python of the e dar-backup (v1) program he made in 2022 and
	has some added features.
      </li>

      <li>
	<span style="font-weight: bold; color: red;">
	  new in 2025;
	</span>
	<a href="https://github.com/per2jensen/dar-backup-image">dar-backup-image</a> yet also by
	Per Jensen, is a docker image bundling <em>dar</em> and <em>dar-backup</em>. This image makes
	it easy to run `dar-backup` in a clean, isolated container environment perfect for use in cron
	jobs, systemd timers, or CI pipeline...
      <li>
	<a rel="colleague" href="http://danmbox.github.io/dar-incdec-repo/">Dar-incdec-repo</a>
	by Dan A. Muresan is a framework for doing periodic DAR backups with
	minimal fuss
      </li>
      <li>
	<a href="https://gitlab.com/notEvil/dar_fuse">dar_fuse</a> by <i>!evil</i>.
	<i>dar_fuse</i> provides a faster AVFS equivalent thanks to its direct
	use of libdar python API and fusepy module.
      </li>
      <li>
	<a href="https://github.com/c4rlo/darbup">Darbup</a> by Carlo Teubner.
	One of darbup key features is its ability to automatically delete old
	archives when the total space taken up by existing archives exceeds
	some configured maximum
      </li>
      <li>
	<a href="https://github.com/jaredjennings/darbrrb">Darbrrd</a> by
	Jared Jennings, to back up a few
	hundred gigabytes of data onto dozens of optical discs in a way that
	it can be restored ten years later.
      </li>
      <li>
	<a href="http://dargui.sourceforge.net/">DarGUI</a> by Malcolm Poole
	is a front-end to dar providing simple and graphical access to the
	main features of dar.
      </li>
      <li>
	<a href="http://www.xsteve.at/prg/emacs/dar.html">Disk archive interface for Emacs</a>
	by <a href="http://www.xsteve.at/">Stefan Reich&ouml;r</a>
      </li>
      <li>
	<a href="https://github.com/peckto/gdar">gdar</a> by Tobias Specht,
	a graphical user interface to browse and extract dar archives
      </li>
      <li>
	<a href="https://wiki.ubuntu.com/HomeUserBackup">HUbackup</a> (Home User
	backup) by SivanGreen
      </li>
      <li>
	<a href="http://kdar.sourceforge.net/">kdar</a> is a KDE-3
	Graphical User Interface to dar made by Johnathan Burchill
      </li>
      <li>
	<a href="http://lazybackup.sourceforge.net/">Lazy Backup</a> by Daniel
	Johnson. Lazy Backup is intended to be so easy even lazy people will do
	their backups
      </li>
      <li>
	A Dar plugin has been made by Guus Jansman for
	<a href="http://mail.gnome.org/archives/mc-devel/2006-April/msg00001.html">
	  Midnight commander
	</a> (mc)
      </li>
      <li>
	<a href="http://sarab.sourceforge.net/">SaraB</a>:
	<i>Schedule And Rotate Automatic Backups</i> - by Tristan Rhodes.
	SaraB works with DAR to
	schedule and rotate backups. Supports the Towers of Hanoi,
	Grandfather-Father-Son, or any custom backup rotation strategy.
      </li>
      <li>
	<span style="font-weight: bold; color: red;">
          new in 2025:
        </span>
	<a href="https://edrusb.github.io/webdar">Webdar</a>:
	a single small binary (8 kiB) embedding a web server, libdar, a FTP and SFTP
	client
	to store/access backups remotely, and a library of graphically customizable
	configurations that can be saved/load
	to disk and/or uploaded/download throuh the HTTP/S session.
      </li>
    </ul>


    <p>
      If a project you know is missing, you are welcome to contact dar's
      author for it to be referred here (contact coordinates can be found in
      the AUTHOR file of the source package).
    </p>


    <hr style="height: 1px;">
    <font size="-1">
      <p>
	<b><sup>1</sup></b> <u>Full backup:</u>
	A full backup is a backup of a full filesystem or of a subset of files
	where, for each file, the archive contains all the inode information
	(ownership, permission, dates, etc.) file's data and eventually file's
	Extended Attributes.
      </p>
      <p>
	<b><sup>2</sup></b> <u>Differential backup:</u>
	A differential backup is based on a full backup. It contains only the
	data and Extended Attributes of files that changed since the full
	backup was made. It also contains the list of files that have been
	removed since the full backup was made. For files that did not change,
	it contains only the inode information. The advantage is that the
	backup process is much faster, the space required is also much
	lower. The drawback is that you need to restore the full backup first,
	then the differential backup to get the last saved state of your system.
	But if you want the last version of a file that changed recently you only
	need the last differential backup.
      </p>
      <p>
	<b><sup>3</sup></b> <u>Incremental backup:</u>
	An incremental backup is essentially the same thing as a differential
	backup. Some make a difference, I do not. The only point I see is that
	the incremental backup is not based on a full backup but on a
	differential backup or on another incremental one.
      </p>
      <p>
	<b><sup>4</sup></b> <u>Decremental backup:</u>
	A decremental backup is a backup method in which the most recent backup
	is a full backup, while the oldest backup are a difference compared to
	that full backup. The advantage of such type of backup is the you can
	restore easily your system in the last state it had using only the last
	backup. And, if you want to restore it in the state it had some time before,
	then you can restore the last backup (full backup), then the previous archive
	(a decremental backup) and so on. As you most usually want to restore the
	system in its last available state, this makes restoration much more
	easy compared to doing incremental backups. However, this suffer from a
	important drawback, which is that you need to transform the last backup
	into a decremental backup when comes the time to make another backup.
	Then you have to remove the former full backup and replace it by its
	decremental version.
      </p>
    </font>
  </body>
</html>