Operating System - HP-UX
1847131 Members
5726 Online
110263 Solutions
New Discussion

Re: Listing ignite backup

 
Waqar Razi
Regular Advisor

Listing ignite backup

I wanna check if a particular file is present in the ignite backup by lisiting that file. That file say file1.date is present in /DR folder, How can I check just this file only?

tar -tvf filename do the lisitng of whole archives, what about pax, can some one give me the syntax to just list a particular file using pax from ignite backup
9 REPLIES 9
Tim Nelson
Honored Contributor

Re: Listing ignite backup

mt -t /dev/rmtXmn fsf 1 (note the no-rewind)
tar vtf /dev/rmtXm |grep file1.date

(tar does not allow the listing of just a single file in the archive ) pipe to grep or send listing to file then grep that file.

Waqar Razi
Regular Advisor

Re: Listing ignite backup

Can I use pax for listing just one file?
Tim Nelson
Honored Contributor

Re: Listing ignite backup

The man page is your friend.

man pax

pax -f tar.file name_of_file

James R. Ferguson
Acclaimed Contributor

Re: Listing ignite backup

Hi Waqar:

Regardless of whether you extract the archive with 'tar' or 'pax', you are going to read the archive sequentially to its end. Thus, if this is a tape, be patient!

Regards!

...JRF...
Waqar Razi
Regular Advisor

Re: Listing ignite backup

What if I restore a particular file, lets say ignite.date in /DR/Ignite directory.
The command would be

tar -xvf /dev/rmt/0mn /DR/Ignite/ignite.date

or

tar -xvf /dev/rmt/0mn DR/Ignite/ignite.date.

The output of tar -tvf /dev/rmt/0mn is as follows:

r-xr-xr-x 2/2 0 Aug 28 11:01 2008 stand/
rwxr-xr-x 0/0 0 Nov 30 06:37 2004 stand/lost+found/
r--r--r-- 0/3 1771 Mar 17 19:30 2008 stand/system
r--r--r-- 0/3 82 Nov 15 14:04 2000 stand/kernrel
rw-rw-rw- 0/3 11344 Jul 31 04:00 2008 stand/ioconfig
rw-r--r-- 0/3 19 Jan 15 00:48 2006 stand/bootconf
rw------- 0/3 0 Nov 30 06:57 2004 stand/.kminstall_lock
rwxr-xr-x 0/3 0 Mar 17 19:31 2008 stand/system.d/
rw-r--r-- 0/3 174 Jan 15 00:55 2006 stand/system.d/krm
rw-r--r-- 0/3 36 Mar 17 19:30 2008 stand/system.d/emcp
rw-r--r-- 0/3 36 Mar 17 19:31 2008 stand/system.d/emcpmpx
rw-r--r-- 0/3 36 Mar 17 19:30 2008 stand/system.d/emcpcg
rw-r--r-- 0/3 36 Mar 17 19:30 2008 stand/system.d/emcpsapi
rw-r--r-- 0/3 36 Mar 17 19:31 2008 stand/system.d/emcpgpx
rw-r--r-- 0/3 36 Mar 17 19:31 2008 stand/system.d/emcpgpx_dm
rwxr-xr-x 0/3 0 Mar 17 19:31 2008 stand/build/
rw-r--r-- 0/3 96814 Mar 17 19:31 2008 stand/build/conf.c
rwxr--r-- 0/3 15489 Mar 17 19:31 2008 stand/build/config.mk
rw-r--r-- 0/3 5116 Mar 17 19:31 2008 stand/build/tune.h
rwxr-xr-x 0/3 0 Mar 17 19:31 2008 stand/build/mod_wk.d/
rwxr-xr-x 0/3 0 Mar 17 19:31 2008 stand/build/mod_wk.d/krm/
rw-r--r-- 0/3 169 Mar 17 19:31 2008 stand/build/mod_wk.d/krm/mod_conf.c
Tim Nelson
Honored Contributor

Re: Listing ignite backup

That would work. but.. these are sequetial archives. whether you use tar and grep or pax to retrieve the list, both will read the entire tape.

Not sure why it is an issue. It does not take more than a couple minutes to retrieve the listing.

Maybe explain further ?
Waqar Razi
Regular Advisor

Re: Listing ignite backup

I am writing a script to verify if the tape is readable at the end of ignite process by either doing a listing or retreiving any file to a particular directory.

Listing I believe is more safer as compared to retreive, but to list the whole ignite backup, it takes more than one hour.
Deepak Kr
Respected Contributor

Re: Listing ignite backup

Razi,

Whether it is a tar or pax in both cases you need to grep for required files from the listing (complete list.

tar -tvf tape device |grep -i

To check tape contents and verify..You can do following:

1. Use find to create a listing of files that you want to backup

2. Create a listing of tape archive

3. run diff or sdiff on both files

This will verify files easily.

"There is always some scope for improvement"
James R. Ferguson
Acclaimed Contributor

Re: Listing ignite backup

Hi Wagar:

> I am writing a script to verify if the tape is readable at the end of ignite process by either doing a listing or retreiving any file to a particular directory

In my opinion, if the Ignite backup returns a sucessful indication in its return code ($? = 0) then the backup was good.

Reading a tape, however successful today, doesn't mean that tomorrow you will be able to read the same tape.

You should clean your tape drives routinely; store and tapes in a good physical environment (clean, not too humid, hot or cold); and recycle them when they have been used too many times. Making and retaining multiple Ignite backups is good insurance, too, that you can always recover should you need to do so.

Regards!

...JRF...