Skip to Content
0

db2 restore from tape drive (not TSM) failing with end of media error

Jun 20, 2017 at 07:43 PM

260

avatar image
Former Member

Hi,

We have a db2 backup of a production database, it has been written to the local tape drive on an IBM 520 machine. The machine is running on AIX 5.3 with a db2 version of 8.2. The backup is an offlline one.

I am attempting to restore the backup to another node .. redirecting it to another DB using the following command

db2 restore database PRD from /dev/rmt0 taken at 20170512230100 into DEV without rolling forward without prompting

The backup appears to restore to the local disk as I can see the data files populating, which looks good. Then right at the end the following message appears

SQL2538N Unexpected end of file of backup image reached on media"/dev/rmt0"

The restore stops and the db2 diag log shows an entry for being unable to connect.

I have tried the above command without the redirect and it fails for the same error.

Any ideas on how to resolve this ? I have tried with 3 different backups now, so its not the backup quality and I have checked each with the db2ckbkp command before starting the restore. Any assistance would be gratefully received

Also, I have read some forums where there is an option to offload the file to disk, using DD command, does anyone have the full syntx of that command as that would provide me with a stop gap.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
avatar image
Former Member Jul 04, 2017 at 03:07 PM
0

The syntax of the command was the issue, it was not related to storage or thetape or the backup quality, the following command worked

db2 restore database PRD from /dev/rmt0 into DEV with 4 buffers buffer 1024 without rolling forward without prompting

Share
10 |10000 characters needed characters left characters exceeded
Juan Reyes
Jun 27, 2017 at 10:31 AM
0

Hi Anthony,

For me that means that the media is incomplete and unusable, I would try to take a backup on disk or use different media.

Regards, JP

Share
10 |10000 characters needed characters left characters exceeded