Comparing tar, cpio, and dump

A few years ago, John Pezzano from Hewlett-Packard did a paper comparing native backup products. It is the best one that I have seen, so I asked his permission to update it and include it in this book. It is Table 3-5.

Table 3-5. Conversion of Native Utilities

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 across network

Using rsh only

Using rsh only

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)

Ease and speed of finding a particular file

Difficult—no wildcards, must search entire volume

Moderate—wildcards, must search entire volume

Interactive—very easy with commands like cd, ls

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

cpio -v 2> logfile

Only after backup with restore -t > logfile

(dump can show % complete, though) ...

Get Unix Backup and Recovery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.