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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tape Backups

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
I am running a Red Hat 7 Linux machine. I have been trying to run a tape back up. by using the following command, I am able to back up the data I want to the Tape:

#tar -cvzf/dev/st0 /filepath/

I then want to make sure that the data has been backed up and I am unable to verify. When i try to access a file or list the files that have been backed up, I get the following message:

tar: This does not look like a tar archive
tar: skipping to next header
tar: /filepath/filename.ext: Not found in archive
tar: Error exit delayed from previous errors

the command that I used to restore is:

#tar -xvf/dev/st0 /filepath/filename.ext

please help. I basically want to check to make sure that the data has been written and can be found on the tape.

also when u restore a file from a backup tape, where is it placed?

thank you for your time
 
I've never used (or seen) the -z option to tar. Can you explain what it does, please? I wonder if it somehow zips the tar file, meaning that it has to be unzipped before untarring it? Just a shot in the dark as I don't have a Linux server to experiment on.
 
Ha. Just read an online man page and it would appear that the -z option gzips the archive as it is tarred. You probably have to include it in the command to restore, ie tar -xvzf in order that the archive is gunzipped as it is untarred. HTH.
 
I was wondering, where will the archived file be stored. I am afraid that if I untar the archive, that it will replace the current data.

Thank You for your help
 
If possible, its generally best not to use -z for backups, because any error can cause your entire backup to be lost. Your tape drive may have some native compression you can enable.

The archive should untar relative to your present working directory, IIRC.

Its somewhat ironic that backups are one of the most dangerous things you can do... Real easy to whack your drive.
 
Thank you for the warning and info. I try to at least verify that the data has been backed up but it always responds wit errors. Also how long does it take to read a file on a tape because when i try to do what KenCunningham suggested with the -z, it takes a long time. is it supposed to do that and if so how long should i wait for it to process the command.

Thank you for your help so far
 
Try running tar -tvzf instead, that should only list the file and not unpack it.

IBM Certified Confused - MQSeries
IBM Certified Flabbergasted - AIX 5 pSeries System Administration
 
With regard to your query re. where the archive will be stored. Do a tar -tvfz and check the output. That should give you an indication of how the tar was performed (ie using absoloute pathnames or relative pathnames, generally beginning with "./"). Post back if more help required.
 
Hi,

Explain !!

the normal tar options are "tar -xvf " for untarring and "tar -cvf " for tarring.(some versions you don't have to add the "-" )
"c" is compress, "x" is uncompress and the "t" is for testing of the tar file/tape
To compress the tar file you could run, for the use of gzip;
gzip {tar-filename} and than you get "tar.gz" of "tgz".

To make it one command you can add it to the tar options;

And it looks like "tar -zxvf /dev/st0 {/directory}" of "tar -zcvf /dev/st0 {/directory}"

(get this by "tar --help");
-o (write a V7 format archive)
-j, --bzip2, --bunzip2 filter the archive through bzip2
-z, --gzip, --ungzip filter the archive through gzip
-Z, --compress, --uncompress filter the archive through compress
--use-compress-program=PROG filter through PROG (must accept -d)

 
Actually....

c = create archive
x = extract
v = verbose (print output on screen)
t = list the files stored on the archive
z = compress/uncompress using gzip/gunzip


ChrisP


------------------------------------------------------------------------------
If somebody helps you, please click the link in the botton left hand corner that says "Mark this post as a helpful/expert post".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top