1820315 Members
2348 Online
109623 Solutions
New Discussion юеВ

Re: Tar and cpio

 
SOLVED
Go to solution
Carter Jay
Advisor

Tar and cpio

Hello,

I 've got problems with Backup Tapes:
1 . How can I check what's on a tape (mt + tar||frecover||cpio????), and what's for you the best way to perform this?
2 . I've tried to put 2 tar archives on one tape, using for the first time:

#mt rew
#tar cvf - / | compress>/dev/rmt/c4t4d0BESTn
The second day, I used:
#mt rew \* To be sure*#mt eod \* To be sure*#tar cvf - / | compress>/dev/rmt/c4t4d0BESTn
Then , to look at what' on my tape:
#mt rew
#uncompressI had the first listing...Then
#mt fsf 1
#uncompressstdin: not in compressed format
Tar: blocksize = 0; broken pipe?
As if i was at the end of the second file and so it couldn't find a tar.

3 . How can I find the date a tar was created (using "uncompress
Could you help

Thanks in advance

Regards

Jerome
4 REPLIES 4
H.Merijn Brand (procura
Honored Contributor
Solution

Re: Tar and cpio

1. *NEVER* make backup's using an absolute path!

# cd /
# tar cvf - . | compress >/dev...

instead of

# tar cvf - / | com...

2. Don't use compress, but gzip. It's both more portable, and compresses much better

3. Use GNU tar (available on https://www.beepz.com/personal/merijn) which has builtin compression

# cd /
# gtar -czf /dev/rmt/c4t4d0BESTn .

4. To see what the tape format is, use 'dd' and 'file'

# cd /tmp
# dd if=/dev/rmt/0m ibs=102400 count=1 of=xx
# file xx

which might be hard to see if you use compress, gzip, or bzip2, because they might not be able to decompress the first block only :/

5. Ad 3. if / does not change (unlikely), it's time stamp has no info whatsoever to the date of the tape.

# cd /
# date >/tmp/stamp
# gtar -czf /dev/rmt/0m /tmp/stamp .

will put the file /tmp/stamp, with the current date, as first file on the tape, giving you a nice and fast indication of when the tape was created

I myself place an index as first file on the tape, so I don't have to read the complete tape to see what's on it. The index then also is my stamp. This is a two pass backup process, but proves to save a lot of time later on

HTH
Enjoy, Have FUN! H.Merijn
Chris Wilshaw
Honored Contributor

Re: Tar and cpio

What kind of tape drive are you using? Accorind to the mt man page

eod Seek to end of data (DDS and QIC drives only).
Chris Wilshaw
Honored Contributor

Re: Tar and cpio

What kind of tape drive are you using? According to the mt man page

eod Seek to end of data (DDS and QIC drives only).
Carter Jay
Advisor

Re: Tar and cpio

Hello,

I'm using a DLT 8000 tape...

Thanks a lot for your help

Regards

Jerome