Operating System - HP-UX
1847860 Members
3136 Online
104021 Solutions
New Discussion

Re: Restore files using tar

 
SOLVED
Go to solution
ajk_5
Frequent Advisor

Restore files using tar

Dear all,

I have a sort of files to restore in the /devlp/report/umm/ directory. I use the command:

# tar xvf /dev/rmt/0m /devlp/report/umm/*

But no response!

Anyone has an idea? Thanks a lot!

Best Regards
Ajk
3 REPLIES 3
John Poff
Honored Contributor

Re: Restore files using tar

Hi,

I believe you just want to specify a file or a directory for your last argument, and not a wildcard. Also, the default for tar is to use /dev/rmt/0m, so you don't have to specify it. Have you tried just testing the tape to see if tar can read it? Something like this:

tar tv /devlp/report/umm

should let you know if tar can read the files from that directory.

JP

Patrick Wallek
Honored Contributor
Solution

Re: Restore files using tar

tar does not like wild cards very much.

Instead, try this:

# tar -xvf /dev/rmt/0m /devlp/report/umm

John Dvorchak
Honored Contributor

Re: Restore files using tar

I think the first thing that I would do is to verify that the tape has what you want on it and also how is it listed. In other words does each file listed start with a dot or a slash. To do this:
tar -tvf /dev/rmt/0m will output a file list to the screen. Then determine if it is a relative or explicit path. A relative path starts with a . so you would have to cd to the head of the directory tree and extract the files from there;

cd /
tar -xvf /dev/rmt/0m ./devlp/report/umm/

I'll bet that is the case since in your example you listed the explicit path that didn't start with a dot (./)

Good luck
If it has wheels or a skirt, you can't afford it.