Link to home
Start Free TrialLog in
Avatar of Member_2_7908671
Member_2_7908671Flag for Kuwait

asked on

Recover data from tape backup from 2005 and older

we have RHEL 5 Linux server with Tape drive DDs4 model

we cannot do list out content of backup and recover from tape

any one advise me  

thanks & regards
khan
Avatar of arnold
arnold
Flag of United States of America image

how was data written to tape, cpio, dump, do you have a record with the position of the tape from which you would to retrieve the data?
i.e. you have to rewind the tape, then position the tape in the correct position where the file is, then retrieve the file data/content using a similar process that was used to write
if you used dump, restore. if you used cpio the data from the tape will now be the source or you would need to uncopress the data from tape before feeding it to cpio. if you used archive (tar,gz) ......

......
the duration when the tape was written only matters if the archive was marked as expiring on date certain.....
DDS4 from 12 years ago!!! Good Luck with that.

If the data is important enough You may need to go to a recovery company
What sort of error do you get when you try to list contents?
Before you even think about which backup utility you used, you need to try to find out which tape you wrote to: e.g. did you software-compress and write to the non-compressing tape drive nst0a?
Or did you use hardware compression by writing to [n]st0 (n is optional - it's the "non-rewinding" drive that doesn't rewind on closing). Software compression as well?
Variable length blocks or fixed (and if so, what length?). If variable, you need to open the drive with block size zero.
Avatar of Member_2_7908671

ASKER

Check status
---------------------
[root@central makora]# mt status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 512 bytes. Density code 0x13 (DDS (61000 bpi)).
Soft error count since last status=0
General status bits on (41010000):
 BOT ONLINE IM_REP_EN

Restore Path
------------------
[root@central makora]# cd /u05/motorsc
[root@central motorsc]# ls -lh
total 0

Restore Command
---------------------------
[root@central motorsc]# /sbin/restore -r -f /dev/nst0
Checksum error 26217447176, inode 0 file (null)
/sbin/restore: Tape is not a dump tape

Unsuccessfully Done !!!
Follow Command accepting tape drive
-------------------------------------------------------
[root@central motorsc]# mt status
SCSI 2 tape drive:
File number=0, block number=4, partition=0.
Tape block size 512 bytes. Density code 0x13 (DDS (61000 bpi)).
Soft error count since last status=0
General status bits on (1010000):
 ONLINE IM_REP_EN
[root@central motorsc]# mt -f /dev/nst0 tell
At block 4.
[root@central motorsc]# tar -tzf /dev/nst0

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error exit delayed from previous errors

[root@central motorsc]# mt status
SCSI 2 tape drive:
File number=1, block number=0, partition=0.
Tape block size 512 bytes. Density code 0x13 (DDS (61000 bpi)).
Soft error count since last status=0
General status bits on (81010000):
 EOF ONLINE IM_REP_EN

[root@central motorsc]# mt -f /dev/nst0 bsfm 1  ------goto Previouse record
[root@central motorsc]# mt stat
SCSI 2 tape drive:
File number=1, block number=0, partition=0.
Tape block size 512 bytes. Density code 0x13 (DDS (61000 bpi)).
Soft error count since last status=0
General status bits on (81010000):
 EOF ONLINE IM_REP_EN
[root@central motorsc]# mt -f /dev/nst0 eod ------goto End of record
[root@central motorsc]# mt stat
SCSI 2 tape drive:
File number=3, block number=0, partition=0.
Tape block size 512 bytes. Density code 0x13 (DDS (61000 bpi)).
Soft error count since last status=0
General status bits on (89010000):
 EOF EOD ONLINE IM_REP_EN
any one should can advise this below request . Need to restore from this tape.

what type of backup done this tape ?      (that is compress or without compress file)
which command help to list out backup?
how to restore data from this tape?

if it is novell or any other then how can identify it.

if it is novell data then any way is there for restore   without specific software.
thanks  for all Experts Response
If it used novel software to backup, you would need to use the same software to restore. The other you have to know whether there is one or several backup blocks on the tape and which is of interest to you.
I.e. Your backups might have one continuous for a full nightly backup of data from systems A,B,and D. Then you have differential section of C,E,F.



You want data for E......
ASKER CERTIFIED SOLUTION
Avatar of Duncan Roe
Duncan Roe
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks   for all expert responses
try below commands  but not succeed
 
[root@central makora]# mt -f /dev/nst0 rewind
[root@central makora]# tar -tzf /dev/nst0

gzip: stdin: not in gzip format
tar: Child died with signal 13
tar: Error exit delayed from previous errors

[root@central makora]# mt stat
SCSI 2 tape drive:
File number=0, block number=80, partition=0.
Tape block size 512 bytes. Density code 0x24 (DDS-2).
Soft error count since last status=0
General status bits on (1010000):
 ONLINE IM_REP_EN
[root@central makora]# mt rewind
[root@central makora]# mt stat
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 512 bytes. Density code 0x24 (DDS-2).
Soft error count since last status=0
General status bits on (41010000):
 BOT ONLINE IM_REP_EN
Is that the same tape as before? The density code has changed from 0x13 (DDS (61000 bpi)) to 0x24 (DDS-2).
Try running dd as I documented in https:#a42054954. The file command will tell you the data format
WRITE PROTECT YOUR TAPE. A mistyped mt command could lose all its data
[root@central motorsc]# mt rewind

[root@central motorsc]# mt -f /dev/nst0a rewind
/dev/nst0a: No such device or address

[root@central motorsc]# mt -f /dev/nst0 rewind

[root@central motorsc]# dd if=/dev/nst0a of=xxx count=1 bs=$((512*256))
dd: reading `/dev/nst0a': No such device or address
0+0 records in
0+0 records out

[root@central motorsc]# dd if=/dev/nst0 of=xxx count=1 bs=$((512*256))
1+0 records in
1+0 records out

[root@central motorsc]# mt -f /dev/nst0 rewind

[root@central motorsc]# dd if=/dev/nst0 of=xxx count=1 bs=$((512*256))
1+0 records in
1+0 records out

[root@central motorsc]# file xxx
xxx: new-fs dump file (little endian), This dump Sun Jan  1 05:00:00 2006, Previous dump Thu Jan  1 03:00:00 1970, Volume 1, Level zero, type: tape header, Label /disk2b, Filesystem /disk2b, Device /dev/sda6, Host srv.honda.com.kw, Flags 1

[root@central motorsc]# cat xxx|gzip -d >yyy

gzip: stdin: not in gzip format

[root@central motorsc]# file yyy
yyy: empty

[root@central motorsc]# ls -lh
total 140K
-rw-r--r--  1 root root 128K Mar 20 10:07 xxx
-rw-r--r--  1 root root    0 Mar 20 10:09 yyy

[root@central motorsc]# cat xxx
▒7▒Cl▒S▒4▒/disk2b/disk2b/dev/sda6srv.honda.com.kw
▒7▒C▒l▒▒c▒▒/disk2b/disk2b/dev/sda6srv.honda.com.kw
▒▒▒[root@central motorsc]#
Follow command working but not successful !!!
---------------------------------------------------------------------

[root@central makora]# cd /u05/motorsc
[root@central motorsc]# ls

[root@central motorsc]# /sbin/restore -i -f /dev/nst0
/sbin/restore > ls
.:
srvexp/

/sbin/restore > cd srvexp
/sbin/restore > ls ---------------------->>> list out file but can't see file size
./srvexp:
SrvFullDB.dmp SrvUsrMon.dmp SrvUsrSun.dmp SrvUsrTue.dmp expusers
SrvFullDB.log SrvUsrMon.log SrvUsrSun.log SrvUsrTue.log starthttp
SrvUsrFri.dmp SrvUsrSat.dmp SrvUsrThu.dmp SrvUsrWed.dmp
SrvUsrFri.log SrvUsrSat.log SrvUsrThu.log SrvUsrWed.log

/sbin/restore > add SrvUsrSun.dmp

/sbin/restore > extract
You have not read any volumes yet.
Unless you know which volume your file(s) are on you should start
with the last volume and work towards the first.
Specify next volume # (none if no more volumes): 1

Tape read error while skipping over inode 98310
continue? [yn] y
Tape read error while skipping over inode 98310
continue? [yn] yes
Tape read error while skipping over inode 98310
continue? [yn] y
Tape read error while skipping over inode 98310
continue? [yn] n
[root@central motorsc]# ls
srvexp
[root@central motorsc]# cd srvexp
[root@central srvexp]# ls -lh
total 0
Below command also working fine  some files restored remain not yet and can't sure these files are full size of files
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
[root@central motorsc]# mt rewind
[root@central motorsc]# /sbin/restore -r -f /dev/nst0
./lost+found: (inode 11) not found on tape
./oradata: (inode 32769) not found on tape
Tape read error while restoring ./srvexp/SrvFullDB.dmp
continue? [yn] y
Tape read error while restoring ./srvexp/SrvFullDB.dmp
continue? [yn] y
Tape read error while restoring ./srvexp/SrvFullDB.dmp
continue? [yn] yes
Tape read error while restoring ./srvexp/SrvFullDB.dmp
continue? [yn] n
[root@central motorsc]# ls -lh
total 1.3M
-rw-------  1 root root 1.1M Mar 20 10:15 restoresymtable
drwx------  2 root root 4.0K Mar 20 10:18 srvexp
-rw-r--r--  1 root root 128K Mar 20 10:07 xxx
-rw-r--r--  1 root root    0 Mar 20 10:09 yyy
[root@central motorsc]# cd srvexp
[root@central srvexp]# ls -lh
total 906M
-rw-------  1 root  root  404M Mar 20 10:27 SrvFullDB.dmp
-rw-r--r--  1 steve steve  45K Jan  1  2006 SrvFullDB.log
-rw-r--r--  1 steve steve 502M Dec 26  2005 SrvUsrMon.dmp
-rw-r--r--  1 steve steve  33K Dec 26  2005 SrvUsrMon.log
-rw-r--r--  1 steve steve  33K Jan  1  2006 SrvUsrSun.log
What Linux distribution is this?

What is the output of dd --version?
I do not know what is a new-fs dump file. You need to find that out. The .dmp file may not be much use if there were tape errors. I only did cat xxx | gzip -d >yyy because file said xxx was gzip compressed data. file did not tell you that.
Tape errors may get better with repeated attempts. Or they may not
You should advance the tape 1file position to see if there are multiple backup files on tape that might explain the different headers.
When using restore you might consider outputting to a data stream
Restore -rf /dev/nst0 - | tar cf /path/to/where/this archive.tar -
This requires that you have enought space to capture/save the archive.
Running restore in interactive mode will allow you to see the table content.

Restore -ir -f /dev/nst0 - .......

....

But it looks like dump/restore is the right for the 0 file

mt -f /dev/nst0 file 1
I think that is the correct syntax to move the tape to the next file start position.
You gave to rewind before attempting to position the tape at the beginning of a possible next file.
I.e. Let's say this tape has backups from four runs. (I think you will get a message that the tape reached the end your attempt to position it at begin inning of file X reaches the end of tape in the process of fast forwarding)
Rewind
Position file 0
Position file 1
Check what is here
Rewind
Position file 2
Check what is here.

The tape based on how you access it /dev/nst0 /dev/nrst0 accesses the same tape resource but each variation indicates whether tape drive compression is activated, etc.
command not working

[root@central motorsc]# /sbin/restore -ir -f /dev/nst0 -| tar cf archiv05.tar   /sbin/restore: r and i options are mutually exclusive
tar: Cowardly refusing to create an empty archive
Try `tar --help' for more information.

below link is one of the discussion related Tape issue
during discussion there mention can we do download software  for different kind of tape restore (60 days trial pack)
please check below link you might get understand

https://www.experts-exchange.com/questions/28001589/Restoring-old-tapes-Arcserve-for-Netware.html
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The referenced link deals with virtualizing an environment to restore data. The main part they knew how the data was backed up. The suggestions provided here and your attempts confirmed that restore can be used to get data from tape. The restored data points to database backup files. The next step is to determine how database backups were done as well as what type of db.
First run file on one of the restored database dmp files.
If it is a MySQL version ,., if it is a different db vendor db2, etc. identifying how those DBS usually backed up .....
thanks your efforts and immediate response
how ever  I restored some files from that tape and copy one table for testing purpose, successfully done.

Total file from the tape (all files I cannot get might tape have error or some problem.)
./srvexp:
 SrvFullDB.dmp SrvUsrMon.dmp SrvUsrSun.dmp SrvUsrTue.dmp expusers
 SrvFullDB.log SrvUsrMon.log SrvUsrSun.log SrvUsrTue.log starthttp
 SrvUsrFri.dmp SrvUsrSat.dmp SrvUsrThu.dmp SrvUsrWed.dmp
 SrvUsrFri.log SrvUsrSat.log SrvUsrThu.log SrvUsrWed.log

Below files only copied & I use to table copy from SrvUsrMon.dmp file
--------------------------------------------------------------------------------------------------
 -rw-------  1 root  root  404M Mar 20 10:27 SrvFullDB.dmp ------------------this is actual 2005 yearly backup
 -rw-r--r--  1 steve steve  45K Jan  1  2006 SrvFullDB.log  ------------------this is actual 2005 yearly backup
 -rw-r--r--  1 steve steve 502M Dec 26  2005 SrvUsrMon.dmp
 -rw-r--r--  1 steve steve  33K Dec 26  2005 SrvUsrMon.log
 -rw-r--r--  1 steve steve  33K Jan  1  2006 SrvUsrSun.log  ------------------this is actual 2005 yearly backup

 too older tapes also we have 2000 , 2001 & 1997 those tape are backed up from Navel Netware  software
presently we don't have this environment and media (s/w)
how can I restore from those tapes . is there any way for restore it.

thanks your  valuable support
As the article you referenced, you could virtualized the environment, but as you and was noted in the article you need the software.
...

You could search the net for VMs that are netware.....
Or take your tape to a commercial data recovery company
Dear Friend

Can you give me the contact link for "commercial data Recovery company"   , I have novel server backup tapes.

thanks for all experts
Before you try that, you could dd the first block off the tape and see if file recognises it
Some tapes are now successfully restored. The Novell tapes are another issue.