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

Reading a file on a backup tape

Status
Not open for further replies.

call

Technical User
Oct 31, 2000
127
US
A tape has been given to me from 1995
Its a magnus 1.2 data cartridge
Format is cpio -ivcud < /dev/rmt0.4

I need to look at some files to see if I can read them
How would I go about doing this with this tape?

They want to convert the data over.

I think I could
cpio -itv < /dev/rmt0.4 to see what is on the tape
But after that what would i need to do?
copy a file from the tape first then try to read it.

If thats the case how could I do this with out copying the data over a file that is newer I will be looking at this on a live system.

thank you.
 
To some extent it depends on how the files were written to tape and where from. You should be able to check this using your cpio -itv command. Can you then post the output (or a sample) here for further advice, please? Cheers.
 
You can set the block size to zero through smit for the device....as a trial or
try to figure out what blocksize it was created at..

Configure the device for variable block size data:
chdev -l rmt# -a block_size=0

Check out this doc:
-----------------------------------
restore from a cpio backup: cpio -iv [-d] [-m] [files] < device
-i means input
-d means create directories
-m means retain modification times
#cpio -idv < /dev/rmt0
#cpio -ivdm files < /dev/rmt0

List contents of a cpio backup: #cpio -itv < /dev/rmt0

remember that whatever flags you use to backup the material, must be used to restore the backup, or you will get an &quot;out of phase&quot; message.

Depending on how the tape was made...(after you look at the itv you will know if it is
absolute or relative.......did they change to that directory and then back it up...or do a find from the / directory.....If it is relative, you can restore to another area...



 
thank you for the help I was able to read the file

Now the files are in ASCII

Tell me if this sound good and will it work.

I want to put the info. that is on the tape back on the hard drive.
By making a directory called test

I will cd into the directory test then run the command
cpio -icvud </dev/rmt0
If im right this should copy whats on the tape into the directory,

Then i will ftp over the network to a server were we can get the info if we need it.

Do you think it will work.
 
It should work if the data was created with relative path.... read the two docs above as to whether they are relative or absolute.....It depends what showed up when you viewed the files... If the file names start with a &quot;/&quot;, the backup is ABSOLUTE.
Anything else is usually RELATIVE backup.

If they are absolute you do have this option.....:.

If they are relative.........no sweat it should work like a charm!!!!
------------------------------------
Remember to use binary when you ftp...since you do not want those pesky ^Ms in your ascii files.
---------------------------------
Absolute
This is a backup that can only be restored to a directory structure identical to the one from which it was made. In the table of contents or the headers on the archive media, the path name will start with a &quot;/&quot;.

The main advantage of an absolute backup is that you can restore the entire image without knowing where individual files are to be placed. An example would be a distribution image of a program or data. The main disadvantage an absolute backup is that the files can only be restored to the same location from which they were backed up.

Relative
This is a backup that will be restored starting from the current directory and will create directories as required, depending on the flags specified. There is more flexibility with relative backups because the files (or directories) can be restored to any directory on the system.

The advantages of a relative backup are that you can restore one or more directories to /tmp (for example) and then selectively copy the files that need to be recovered to the destination directory. Ensure it is the proper directory before starting the restoration. The main disadvantage of a relative backup is that it will restore the data to the directory that is current when the command is issued.
 
Check out and found its Relative.
after doing one tape it work great, thanks for the help.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top