Linux + Tar question (before using amanda to back-up user dirs)

calpha

Golden Member
Mar 7, 2001
1,287
0
0
OK...maybe wrong forum.....

I'm preparing my auto-backup script for users home directories, and so far I've just got a bunch of tar commands to run via cron at each day at midnight. Not smart enuf to script the tape drive into it yet (never tried scripting anything w/ amanda) , but I'm just doing a tar.bz2 compression of everything onto the raid drive.

Rar (in windows at least) lets you generate a recovery record for an archive in case it's crc checksums fail. As long as it's not a solid archive, you can usually get most of the archive out anyway....except fr the files that failed. (If it's solid archive, then you're sol if repair doesn't work).

So that being said....I understand Rar's very well.....but was wondering if there's anyway to secure my tar files in the event that I muck something up and corrupt them. I'm a bit nervous b/c I'm about to be blowing the 245 GB User Raid away and re-installing....and would like to feel a little more secure then just knowing I have the tars on tape.

I only ask this b/c the last time I dl'd a massive tar from IRC (yes, it was a movie, so sue me) the entire ah heck was corrupt, and for the life of me I couldn't fix it. And yah, I dl'd it twice.

Thanx for the replies.

[edit]

right now i'm just doing a tar -cjf <username> user dir
[/edit]
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
If you've ever looked at a tar file of ascii data, you'll see that it basically just appends the files together with some header information (file name, path, permissions, and maybe some sort of CRC) between them. So it should be possible to manually extract files. So somebody has probably written a utility to do it somewhere.

Also note that bzip2 has a "recover" program (bzip2recover) that may help.
 

Haden

Senior member
Nov 21, 2001
578
0
0
Rar is good and you like it, so why not use it on *nix box? (apt-get it, or download at www.rarlab.com).
I'm very satisfied with it for my backups.
 

calpha

Golden Member
Mar 7, 2001
1,287
0
0
hmmm....maybe it's just better to bz2 them and not tar.bz2 if that's the case.....

thanks for hte reply
 

calpha

Golden Member
Mar 7, 2001
1,287
0
0
Originally posted by: Haden
Rar is good and you like it, so why not use it on *nix box? (apt-get it, or download at www.rarlab.com).
I'm very satisfied with it for my backups.

Hell...I never even checked if Rar was available on *nix. I just ASS-U-MEd it wasn't. thanks for the info.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
You should be able to extract single files or directories from tarballs by specifying them on the command-line after the tarball name. If the tar gets corrupt it should just skip the bad data, I've never seen a corrupt tar eat all the files unless it's compressed and that's gzip or bzip2's fault.