Section 3.13. Comparing tar, cpio, and dump


3.13. 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 a bit to reflect changes in the utilities and include it in this book. Table 3-3 compares tar, cpio, and dump.

Table 3-3. Conversion of native utilities
Featuretarcpiodump
Simplicity of invocationVery simple(tar c files)Needs find to specify filenamesSimplefew options
Recovery from I/O errorsNonewrite your own utility resync option on HP-UX causes some data lossAutomatically skips over bad section
Back up special filesLater revisionsYesYes
Multivolume backupLater revisionsYesYes
Back up across networkUsing rsh/ssh onlyUsing rsh/ssh onlyYes
Append files to backupYes (tar -r)NoNo
Multiple independent backups on single tapeYesYesYes
Ease of listing files on the volumeDifficultmust search entire backup (tar -t)Difficultmust search entire backup (cpio -it)Simpleindex at front (restore -t)
Ease and speed of finding a particular fileDifficultno wildcards; must search entire volumeModeratewildcards; must search entire volumeInteractivevery easy with commands like cd, ls
Incremental backupCan use newer or find if using GNU tar Must use find to locate new/modified filesIncremental 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)
Back up based on other criteriaYes, with GNU tar find can use multiple criteriaNo
Restore absolute pathnames to relative locationYes, with GNU tar With cpio I, or with GNU cpio Always relative to current working directory
Interactive decision on restoreYes or no possible with tar -w Can specify new path or name on each fileSpecify individual files in interactive mode
CompatibilityMultiple platformMultiple platform with ASCII header, not always portableReadable between some platforms, but cannot be relied on
Primary usefulnessSystem backup if GNU tar, otherwise individual user backup, transfer files between filesystemsSystem backup, transfer files between filesystemsSystem backup
Volume efficiencyMedium, usually limited to 10 K block sizeMediumusually only 5 K block size, but can specify larger size on some OSesHighcan usually specify up to maximum block size of device
Wildcards on restoreNoYesOnly in interactive mode
Simplicity of selecting files for backup from numerous directoriesLowmust specify each independent directory, subdirectories includedMediumfind optionsNonebacks up one and only one filesystem
Specifying directory on restore gets files in that directoryYesNomust use path/* Yes
Stop reading tape after a restored file is foundNoNoStops reading tape as soon as last file is found
Track deleted filesNoNoIf you restore with -r, files deleted before last incremental dump are deleted
Filesystem efficiencyBetterWorst (files get a stat from both find and cpio)Best
Likelihood that file exists in TOC but not in archiveLowLowMedium (because TOC is made first)


Standard backup utilities may not be very sexy or even full of features, but if you get to know them, they will always be there. Some of the "semi-native" commands (for example, GNU tar, GNU cpio) are also very helpful, but they are not always available. Therefore, a good working knowledge of the truly native commands can come in very handy when you're in a jam or when someone hands you an unknown volume and says "Can you read this?"




Backup & Recovery
Backup & Recovery: Inexpensive Backup Solutions for Open Systems
ISBN: 0596102461
EAN: 2147483647
Year: 2006
Pages: 237

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net