LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 05: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, 09:18 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,631

Rep: Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696
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, 09: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, 08:46 AM   #4
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,631

Rep: Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696
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 08:51 AM.
 
Old 01-28-2021, 12:27 PM   #5
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
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, 08:04 AM   #6
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,631

Rep: Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696
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, 05:36 AM   #7
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,864
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
@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



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-14-2012 11:37 PM
How to backup more than one time on same tape using DLT tape? hocheetiong Linux - Newbie 3 01-30-2008 06:54 AM
Using a DDS5 tape drive to restore from a DDS3 backup tape. AndrewCAtWayofthebit Linux - Hardware 1 05-14-2006 09:15 AM
Tape incremental backup to different tape tungaw2001 Linux - Software 0 08-13-2003 09:42 PM
Old slackware tape backup - need to restore rah Slackware 14 04-09-2003 11:51 PM

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

All times are GMT -5. The time now is 04:35 PM.

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