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

Need help on restore

Status
Not open for further replies.

babeo

Technical User
Mar 30, 2000
398
CA
Hi all

I accident del fileS, the pattern of the files are: MONxxxx
Because there are about 20 of them like that. I want to restore them all from tape, but I tried the following command for 1 file first:

tar xvf /dev/rmt/0 /tvo/archives/MON20000910

It seems do nothing, I don't know should I use /dev/rmt/0n or what command should I use.

Thanks [sig][/sig]
 
how did you get them on to the tape? did you use tar? ufsdump? etc.

Greg. [sig][/sig]
 
I use:

tar uvf /dev/rmt/0 /tvo/archives

In fact, it is the auto backup at night by crontab for the above directory happens at 4:30am everyday.

Anyway, I think I solve the problem, I remember, I just change the new tape a few days ago, which don't include the files I want on this new tape, I have to use the old tape.

Thanks for your response that cause my mind click
[sig][/sig]
 
In fact, I have a question:

How can I restore all files at once? and the command I use above is actually does not do anything, which is over 1 hr already! [sig][/sig]
 
There are different scenarios.
Case 1
Since u copied the files with /tvo/archives as the path,
the files in the tape will have the same absolute path.
If u down load a file, say monday_file from the above tape
using ,
$tar xvf /dev/rmt/0 /tvo/archives/monday_file
the monday_file will be restored in /tvo/archives directory,
no matter what is your present directory.

Case 2
Assume that u created a tape backup, while u r in
/tvo/archives directory.
$cd /tvo/archives
$tar cvf /dev/rmt/0 .
In this case all the files in and below /tvo/archives are backed up with a relative path. ie, ./tvo/archives
If u restore monday_file by
$tar xvf /dev/rmt/0 ./tvo/archives/monday_file
it will be restored after creating the directory tree tvo/archives below your current directory.
Say if u execute tha above command from /tmp, monday_file can be seen in /tmp/tvo/archives directory.

Case 3
Say, u backed up the files using
$cd /tvo/archives
$tar cvf /dev/rmt/0 *
Your files are copied without any path name.
U can download monday_file using
$tar xvf /dev/rmt/0 monday_file
It`s created in your present directory.

Always run , tar tvf /dev/rmt/0 to see how files are
copied to the tape, so that they can be restored properly.

To download all the files from the tape
$tar xvf /dev/rmt/0

Jay


[sig][/sig]
 
Hi Jay

The case 1 absolutely applys to my situation, you can see

However, I still can not recover files from tape, I don't know why. Even I use tvf, the command just hangs there forever!!

Do you know what the reason why? [sig][/sig]
 
Have you tried rewinding the tape
mt -f /dev/rmt/0 rewind [sig][/sig]
 
The time taken to restore a file from the tape depends on
the physical position of the file. If your file is near the end of the tape, it may take time to restore it.
To make sure that the tape is in good readable condition,
try tar tvf /dev/rmt/0 after rewinding the tape by
mt -f /dev/rmt/0 rewind
or
mt -f /dev/rmt/0 retension


Good luck

Jay
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top