Operating System - HP-UX
1832525 Members
7691 Online
110043 Solutions
New Discussion

Re: Saving To File A Listing of the Contents of an FBackup tape

 
Andrew Kaplan
Super Advisor

Saving To File A Listing of the Contents of an FBackup tape

Hi there --

Is there a way to do save to file a listing of the contents of an FBackup tape? Correct me if I am wrong, but aren't fbackup and tar the same?
A Journey In The Quest Of Knowledge
13 REPLIES 13
Rodney Hills
Honored Contributor

Re: Saving To File A Listing of the Contents of an FBackup tape

fbackup is totally different from tar.

You can get the generated index file that is located at the front of the type by-
frecover -f /dev/rmt/0m -I /tmp/tapeindex

or you can read the entire tape with-
frecover -vN -f /dev/rmt/0m >/tmp/tapelist

HTH

-- Rod Hills
There be dragons...
Andy Torres
Trusted Contributor

Re: Saving To File A Listing of the Contents of an FBackup tape

frecovery -N -v will produce a listing of files from a fbackup tape.
See the man page for frecover for further details.

I think fbackup actually uses cpio and make_tape_recovery uses tar or cpio. I might be wrong on those. Someone will probably verify that for me in the next reply.
Rodney Hills
Honored Contributor

Re: Saving To File A Listing of the Contents of an FBackup tape

If you wanted to generate the list as the backup is created, then use the -I option on fbackup.

fbackup -f /dev/rmt/0m -I /tmp/tapelist -i /somedirectory

HTH

-- Rod Hills
There be dragons...
Rodney Hills
Honored Contributor

Re: Saving To File A Listing of the Contents of an FBackup tape

Andy,

fbackup is not like cpio. fbackup has its own tape format it creates.

make_tape_recovery uses pax (a tar like backup) to create the tape.

HTH

-- Rod Hills
There be dragons...
James R. Ferguson
Acclaimed Contributor

Re: Saving To File A Listing of the Contents of an FBackup tape

Hi Andrew:

To add to Rodney's reply, 'fbackup' is HP-UX proprietary and therefore does not provide portability whereas (of course) 'tar' does.

However, 'fbackup' & 'frecover' allow high-speed tape searches and make file recovery times quicker. 'fbackup' also provides some very good checksum integrity checks.

The "index" for the contents of an 'fbackup' tape is generated as the 'fbackup' session begins, when the "graph" (files to include and/or exclude) is processed. It is possible for a file to be removed between the time the index is written to tape and the actual file is sought for transfer from disk to tape.

Thus, reading the tape for the actual files present is superior to merely reading the index if you absolutely want to guarantee the presence of a file.

Regards!

...JRF...
Andrew Kaplan
Super Advisor

Re: Saving To File A Listing of the Contents of an FBackup tape

Hi there --

Thanks for your reply. The syntax that I am using is the following:

frecover -vrN -f /dev/rmt/5m > /tmp/datalist.txt

The contents of the tape are being displayed onscreen, and there is a 0-byte file named datalist.txt in the /tmp directory.

The only other question I have is, will the datalist.txt file become populated with the information being shown onscreen once the frecover command is completed? Thanks.
A Journey In The Quest Of Knowledge
Andy Torres
Trusted Contributor

Re: Saving To File A Listing of the Contents of an FBackup tape

Thanks for clarifying the fbackup method, Rod. cpio is mentioned at the bottom of the frecover man page. I incorrectly associated it with fbackup.

make_tape_recovery does use pax to package the ignite tape, but can use cpio or tar format to store the files (-m option).

Thanks again for the clarification.

Andrew, if the list doesn't come out you might like to try again without the -r option, just -vN.
Rodney Hills
Honored Contributor

Re: Saving To File A Listing of the Contents of an FBackup tape

You also may want to include redirection of STDERR.

frecover -vN -f /dev/rmt/5m >/tmp/datalist.txt 2>&1


Rod Hills
There be dragons...
Andrew Kaplan
Super Advisor

Re: Saving To File A Listing of the Contents of an FBackup tape

Hi there --

When I include the 2>&1 as part of the command syntax, I get an ambiguous output redirect error message. Also, the absense of the -r option causes the frecover to not run but simply list all options.
A Journey In The Quest Of Knowledge
Andy Torres
Trusted Contributor

Re: Saving To File A Listing of the Contents of an FBackup tape

I guess go ahead an dput the -r back in, and run again using | tee -a /tmp/datalist.txt.

Full syntax:
frecover -vrN -f /dev/rmt/5m | tee -a /tmp/datalist.txt
Rodney Hills
Honored Contributor

Re: Saving To File A Listing of the Contents of an FBackup tape

2>&1 is the universal way to redirect STDERR to STDOUT. Did you include a space before the "2".

Can you show the command you are using.

Rod Hills
There be dragons...
Andrew Kaplan
Super Advisor

Re: Saving To File A Listing of the Contents of an FBackup tape

Hi there --

The command that I was using is shown below:


frecover -vrN -f /dev/rmt/5m >/tmp/datalist.txt 2>&1

A Journey In The Quest Of Knowledge
Rodney Hills
Honored Contributor

Re: Saving To File A Listing of the Contents of an FBackup tape

Be sure you are in the standard shell "sh" or "ksh". If you are in "csh", that will give you the error you are seeing...

Rod Hills
There be dragons...