Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CPIO vs TAR

Status
Not open for further replies.

jcoleman

MIS
Dec 24, 2002
87
CA
What does everyone think? Which is faster, which one does better compression, which one is more reliable? I'm using cpio right now and it takes forever. I've done a little bit of testing with tar. What is everyone using? I don't really want to get into any third party software.
 
Get into 3rd party software. One of the super tars. They verify that the backup has happened correctly.

Tar will lead you down the primrose path dropping breadcrumbs the whole way, then scatter the breadcrumbs so that nothing is recoverable.

I've avoided CPIO for various reasons.

Ed Fair
Give the wrong symptoms, get the wrong solutions.
 
I personally use a customised (mainly for backup verify) version of gnu-tar.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
If you do man on tar you will notice that tar has specific limitations than cpio.

tar is fine for traversing through user's directory and backup information as required. However tar has limitationas as how it can maintain symbolink links.

cpio MUST be used if you want to do system backup. It will backup empty directories, including lost+found and /dev files plus maintain all symbolink links.

In the nutshel - may be not so mmuch emphasized, though:

cpio is mostly used by system adminsitrators
tar for regular users and for random backups within user's hierarchical structure.

man on tar and cpio will explain that very clearly.

westclox
 
Since we're only giving opinions, I'll add my two cents. TAR (affectionately referred to as 'tape and regret') is OK for general file backups, temporary backup and retores of not-so-necessary data, and the like. It is not quite as OS flexible though and should only be used for in-house, on-site type of backups. And Oh, yeah, there is that thing about not handling symbolic links or device files.

CPIO is probably a better cross-platform type of backup since more UNIX versions recognize standard cpio format and headers. Not to say that they all do, but you can generally feel safe that a cpio backup from one OS will be recognizable by another.

As for speed, it is my feeling that speed of backup is directly related to filesize rather than utility used. Compress any file and it will backup a lot faster than it's uncompressed format. So, if you want to speed up the backups, pack-up that back-up before you save it. It makes a lot of difference. And always, I mean ALWAYS, verify your backup when complete, both by re-reading and occasionally recovering it.

The super-tars are good, and they certainly provide a better form of 'verified' backup than either of the other two, but what happens when you lose your system and have to go off-site to recover some data? If you don't happen to have a ready made copy of the super-tar software primed and ready to load you might run into some problems. But, that's a contingency situation that any responsible Administrator will have addressed, and provided for.

The choice is yours. Use what is best suited for your particular budget and situation. Just be sure to always guarantee your backups are recoverable.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top