next up previous
Next: Tar Up: Backing Up Your Linux Previous: Planning Your Backups

Native Linux (and Unix) Backup Tools

There are several backup tools that are available natively for Unix. Each has their strengths and weaknesses. They appear as they are today after several years of evolution and refinement. The native utilities are:

The following table compares each of their strengths and weaknesses 1

Feature tar cpio dump
Simplicity of invocation Very Simple (tar c files) Needs find to specify filenames Simple--few options
Recovery From I/O errors None--write your own utility Resync option on HP-UX will cause some data loss Automatically skips over bad section
Back up special files Later revisions Yes Yes
Multivolume backup Later revisions Yes Yes
Back up accross network Using rsh only Yes Yes
Append files to backup Yes (tar-r) No No
Multiple independent backups on single tape Yes Yes Yes
Ease of listing files on the volume Difficult--must search entire backup (tar-t) Difficult--must search entire backup (cpio-it) Simple--index at front (restore -t)
Incremental backup No Must use find to locate new/modified files Incremental of whole filesystem only, multiple levels
List files as they are being backed up tar cvf 2\(>\)logfile Only after backup with restore -t \(>\) logfile (dump can show % complete, though)
Back up based on other criteria No find can use multiple criteria No
Restore absolute pathnames to relative location Only by using chroot Limited with cpio-I Always relative to current working directory
Compatibility Multiple platform Multiple platform with ASCII header, not always protable Readable between some platforms, but cannot be relied on
Primary usefulness Individual user backup, transfer files between filesystems System backup, transfer files between filesystems System backup
Volume efficiency Medium, usually limited to 10 K block size Medium, usually only 5 K block size, but can specify larger size on some OSes High, can usually specify up to maximum block size of device
Wildcards on Restore No Yes only in interactive mode
Simplicity of selecting files for backup from numberous directory Low--must specivy each independent directory, subdirectories included Medium--find options None--will back up one and only one filesystem

Generally, if you had your choice of native backup tools, dump should probably be your best choice. Not only is it relatively simple to use, it also has a great amount of functionality built in. This leaves the administrator free to think more about what he wants to back up and less about how he needs to back it up. Dump also spawns several processes, making it faster. Finally, Dump provides a mechanism built in for interactive file recovery. The syntax of dump is as follows:

dump levelunbdsf blkg-factor density size device-name file_system

  1. 0-9 Specifies the level of backup that dump should perform.
  2. b Specifies the blocking factor that dump should use.
  3. u Tells dump to update the dumpdates file.
  4. n Tells dump to notify the members of the operator group when a dump is completed.
  5. d and s Tell dump how large the backup volume is.
  6. f tells dump what device to use.
  7. W,w little used options tell dump to perform a dry run.
Fortunately, with Linux you can usually simply perform the following:

/sbin/dump -0u -f /dev/st0 /your/filesystem/to/backup

To get a list of the files from the tape, enter this:

restore -t /dev/st0

Of course, you can pipe this output out to a file.


next up previous
Next: Tar Up: Backing Up Your Linux Previous: Planning Your Backups
D. Cooper Stevenson 2001-05-16