LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices


Reply
  Search this Thread
Old 01-27-2021, 06:21 AM   #1
barataaway
LQ Newbie
 
Registered: Jan 2012
Location: São Paulo / SP / Brazil
Distribution: Red Hat, Fedora, SuSe, HPUX, Solaris
Posts: 12

Rep: Reputation: Disabled
Question How to restore a single file from tape backup to a specific directory in AIX 6.1


Hi All,

I've inherited an AIX 6.1 box and I have to restore a single file from a tape device. The hardware is on another country and I don't have physical access to it - just remote access via putty.

So far I can see multiple rmt0 devices under /dev/ (rmt0, rmt0., rmt0.1, rmt0.2,.... rmt0.6)

Also, to list the files on the tape, I had to do
Code:
dd if=/dev/rmt0 bs=128k | tar tvf -
. Commands like
Code:
restore -Tvf /dev/rmt0
just run into
Code:
"restore: 0511-260 the archive is not in backup format"
errors

With that said, I tried to run
Code:
smit restfile
, but I just get the same
Code:
"restore: 0511-260 the archive is not in backup format"
error.

So, how should I proceed to restore a single file from that tape into a destination directory defined by myself?

Thank you.
 
Old 01-27-2021, 10:18 AM   #2
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 3,613

Rep: Reputation: 1618Reputation: 1618Reputation: 1618Reputation: 1618Reputation: 1618Reputation: 1618Reputation: 1618Reputation: 1618Reputation: 1618Reputation: 1618Reputation: 1618
Step 1 is to look at the tape backup scripts (I assume there are scripts) and discover how the tape is WRITTEN. Until you know what was written, trying to extract randomly is pointless. IF you were to succeed, it would be a product of impure luck. I hate depending upon luck! Start from certain knowledge.
 
Old 01-27-2021, 10:49 AM   #3
Nemesisforyou
LQ Newbie
 
Registered: Jan 2021
Posts: 1

Rep: Reputation: Disabled
There is no such script under root user as well as other users
 
Old 01-28-2021, 09:46 AM   #4
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 3,613

Rep: Reputation: 1618Reputation: 1618Reputation: 1618Reputation: 1618Reputation: 1618Reputation: 1618Reputation: 1618Reputation: 1618Reputation: 1618Reputation: 1618Reputation: 1618
Quote:
Originally Posted by Nemesisforyou View Post
There is no such script under root user as well as other users
Then there should be some kind of continuity document, procedure manual, DR manual, or other documentation that records how backup and recovery was intended to work on this platform. (All assuming the System Admin knew his job.) You need to know how the backups were written to be sure you can recover them. You can test them with some of the common tools (tar or pax for example) but until you know the details on format and the command line options used you are shooting in the dark.

PS. I have, on occasion, solved issue when shooting in the dark. I HATE that. It is always better to know what SHOULD work so you can better identify causes when it does NOT. Without that, if it works you will not know why it worked, if it fails you will not know why it failed. That is a poor way to start off.

PPS. Could this be a Makesysb or Savevg tape rather than a regular backup tape? That would make a HUGE difference! There are man, info, DOC, and Redbook pages for those utilities available for install and online at the IBM support sites.

Last edited by wpeckham; 01-28-2021 at 09:51 AM.
 
Old 01-28-2021, 01:27 PM   #5
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Mineral, Virginia
Distribution: Debian 8
Posts: 7,891

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
You are having all kinds of trouble separating out an individual file off the tape. I suggest that you try restoring the entire tape to a hard drive and then look for the file that you want on the hard drive.

------------------------------
Steve Stites
 
Old 01-29-2021, 09:04 AM   #6
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 3,613

Rep: Reputation: 1618Reputation: 1618Reputation: 1618Reputation: 1618Reputation: 1618Reputation: 1618Reputation: 1618Reputation: 1618Reputation: 1618Reputation: 1618Reputation: 1618
Quote:
Originally Posted by jailbait View Post
You are having all kinds of trouble separating out an individual file off the tape. I suggest that you try restoring the entire tape to a hard drive and then look for the file that you want on the hard drive.

------------------------------
Steve Stites
While that should work, it assumes you have adequate storage space for that size of a restore. If you do, that costs only time. If not, I believe you have pointers to the kinds of places to look up information. Please let us know what you find.
 
Old 02-06-2021, 06:36 AM   #7
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,140

Rep: Reputation: 1518Reputation: 1518Reputation: 1518Reputation: 1518Reputation: 1518Reputation: 1518Reputation: 1518Reputation: 1518Reputation: 1518Reputation: 1518Reputation: 1518
@OP
So you've found out it is in tar-format, then use tar to extract files.
Code:
dd if=/dev/rmt0 bs=128k | tar xvf - <pathnames>
The pathname is what you see in the output of `tar tv`
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Tape drive backup and Restore shubhamuddu Linux - Newbie 5 06-15-2012 12:37 AM
How to backup more than one time on same tape using DLT tape? hocheetiong Linux - Newbie 3 01-30-2008 07:54 AM
Using a DDS5 tape drive to restore from a DDS3 backup tape. AndrewCAtWayofthebit Linux - Hardware 1 05-14-2006 10:15 AM
Tape incremental backup to different tape tungaw2001 Linux - Software 0 08-13-2003 10:42 PM
Old slackware tape backup - need to restore rah Slackware 14 04-10-2003 12:51 AM

LinuxQuestions.org > Forums > Other *NIX Forums > AIX

All times are GMT -5. The time now is 09:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration