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

tar -xvf on AIX 4.3.3.0

Status
Not open for further replies.

TurtleOp

IS-IT--Management
Jul 4, 2008
22
US
I am on a old AIX 4.3.3.0 trying to restore a backup on tape.
The device /dev/rmt1 exist end I succeed to execute the following command with correct result:
tar -tvf /dev/rmt1
I obtained the containt of the tape backup. It take approx. 2 hours.
But when I try to make any restore, nothing happened, no message, nothing.
Ex. of commmand I've tried:
tar -xvf /dev/rmt1 ./oradata01/DBNAME/dbf/prodtai.dbf
tar -xvf /dev/rmt1 './oradata01/DBNAME/dbf/prodtai.dbf'
tar -xvf /dev/rmt1
tar - xvvf ./oradata01/DBNAME/dbf/prodtai.dbf

No way.. and I do not know if tar generate some log somewhere ...
Any ideas Welcome!

TurtleOp
 
Have you rewound the tape? The simple answer is to eject and replace before trying the tar -xvf again

On the internet no one knows you're a dog

Columb Healy
 
Sounds good and easy ;)
I will try!
Thank you,
TurtleOp
 
And here is the man page for tar command:


You don't have to rewind the tape as the command you used should have rewinded the tape already as it is using /dev/rmt1 (rewindable) and not /dev/rmt1.1 (not rewindable).

For more info on tape manupilation have a look here:


Regards,
Khalid
 
Hi Khalid,
No, its correct, the backup was already done, I just tried to restore it. I made an inventory of the tape, successfully. My problem is the restore -x ;)
 
Pitty, I was hoping that was the problem...
Thank you for useful links,
Regards,
TurtleOp
 
Can't be correct!!!

Code:
Required Flags 
-c Creates a new archive and writes the files specified by one or more File parameters to the beginning of the archive. 
-t Lists the files in the order in which they appear in the archive. Files can be listed more than once. 
-x Extracts the files specified by one or more File parameters from the archive. If the File parameter refers to a directory, the tar command recursively extracts that directory from the archive. If you do not specify the File parameter, the tar command extracts all of the files from the archive. When an archive contains multiple copies of the same file, the last copy extracted overwrites all previously extracted copies. If the file being extracted does not already exist on the system, the file is created. If you have the proper permissions, the tar command restores all files and directories with the same owner and group IDs as they have on the tape. If you do not have the proper permissions, the files and directories are restored with your owner and group IDs. It is not possible to ask for any occurrence of a file other than the last.

Regards,
Khalid
 
I think we have a small misunderstanding. My bad probably.
In fact, because I did'nt succeed to restore my backup, I made an inventory, that was successfull, using the command:
tar -tvf /dev/rmt1

TurtleOp
 
Ok now we are on the same track!

When you tried to view the content of the tape, was files appeared in an Absolute or relative format?

Coz if they were backed up using Absolute format then you have to restore files using the following command instead:

Code:
tar - xvf /oradata01/DBNAME/dbf/prodtai.dbf

Code:
Relative vs Absolute Paths
When restoring files backed up with the backup, cpio, or tar commands, find out FIRST whether RELATIVE or ABSOLUTE pathnames were used BEFORE the restore is initiated. We recommend using RELATIVE.

Relative pathnames will have a ./ pre-fixed to their path.  These files will be restored relative to the current directory. 
Absolute pathnames won't have the ., just the /.  These are restored with the full pathname to the exact directory as specified on the archive device.


Regards,
Khalid
 
Relative paths, for sure, starting with the "."
 
TurtleOp,

Are you sure that this file (./oradata01/DBNAME/dbf/prodtai.dbf)
exists on the tape?

Try this to confirm:

Code:
tar -tvf /dev/rmt1 | grep oradata01/DBNAME/dbf/prodtai.dbf

Regards,
Khalid
 
My backed up files are using relative path as well - I've just now double check it - But I will make a test anyway.
Thank you
TurtleOp,
 
I will try the command immediately but yes I am sure at 100% at least according the inventory. I have also made a cupple of others try with different files :(
I am fighting since 3 days now ... sic!
TurtleOp
 
You can as well try with restore command if tar doesn't work!

Code:
restore -x -v -q -f /dev/rmt1 ./oradata01/DBNAME/dbf/prodtai.dbf

Don't forget that the restore or tar command using relative path will restore your files in your current directory! You might already know this but i thought of saying it any way :)

Regards,
Khalid
 
I try it already, but restore command don't run on tar backup. I received an error message on this way. the backup must be done using backup command.
TurtleOp
 
3 days!!! I hope we solve this together :) If not then i would suggest you replace the tape and try the whole exercise again unfortunately!

Regards,
Khalid
 
opps, sorry, my bad this time! so back to tar i guess!

Regards,
Khalid
 
You right! I already ask the customer to insert a NEW tape in the prod server. But I need to wait monday that they physically move the tape inside the standby server.
I am working remotely, my goals is to test some old procedure to restore an Oracle 8i standby database. Conclusion: Its always good to test our backup...
By the way, I ask them, it seems the tape are 6 months old but I d onot know at which frequence they are used.
Kindest Regards,
TurtleOp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top