Issues With Restore
Posted in 2017
User on IDS 11.50 tried restoring a dev instance with 'ontape -p' and the server hung in Fast Recovery, then failed with shared-memory errors (mt_shm_remove warnings, fatal error in shared memory creation). Advice: run 'onclean -ky' as informix to clear shared memory segments, then use 'ontape -r' (not -p, which is only a physical restore for HDR/ER setups) — this worked. A follow-on problem was that ontape prompts for the same TAPEDEV filename for the level-1 archive; suggestions were to pipe both files via cat into 'ontape -r', or Ctrl-Z the restore to rename the file and 'fg' back, which the user reported worked. onbar/PSM was also mentioned as an alternative.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Backup & Restore, Storage & Space Management, Versions, Editions & End-of-Life
Hi, this is a dev box. I made a backup and am now trying a restore, which has
gotten me into a circle of issues
I used ontape -p and it asks for the file, I say y to restore, n to logs, n to
differential backup etc. I actually have a level 0 and level 1 backup, but
just want to restore the level 0.
When it is done, it says Physical Restore of rootdbs,logdbs,datadbs Completed.
When I then do onstat -
It says IBM... Version 11.50.FC9DE ---Fast Recovery --- and it is stuck at
this point.
I have tried stopping the instance and restarting and it now tells me in the
log
mt_shm_remove: WARNING: may not have removed all/correct segments.
I did a search and found Art Kagle had answered a post to run onstat -D and
now it says shared memory not initialized for INFORMIXSERVER 'newsserver'
I go back to the log and it is still saying
mt_shm_remove: WARNING: may not have removed all/correct segments.
I found another of Arts posts that says to try onclean -ky and that looks like
it looked for shame keys but not sure if it did anything.
Any ideas on this one?
I tried it well 10 times now, but it is now saying: Warning: Fatal error in shared memory creation
Benji,do:
1) onclean -ky (as Informix id to clean up all shared memory segments)
2) ontape -r (follow what it asks you. For your testing purpose, do not back
up the current logs, do not restore with level 1)
Good luck.
Let's go GreenThis email contains 100% recycled electrons.
From: BENJI LONG <ruggedmouse@hotmail.com>
To: ids@iiug.org
Sent: Thursday, September 14, 2017 12:32 PM
Subject: Issues With Restore [39862]
Hi, this is a dev box. I made a backup and am now trying a restore, which has
gotten me into a circle of issues
I used ontape -p and it asks for the file, I say y to restore, n to logs, n to
differential backup etc. I actually have a level 0 and level 1 backup, but
just want to restore the level 0.
When it is done, it says Physical Restore of rootdbs,logdbs,datadbs Completed.
When I then do onstat -
It says IBM... Version 11.50.FC9DE ---Fast Recovery --- and it is stuck at
this point.
I have tried stopping the instance and restarting and it now tells me in the
log
mt_shm_remove: WARNING: may not have removed all/correct segments.
I did a search and found Art Kagle had answered a post to run onstat -D and
now it says shared memory not initialized for INFORMIXSERVER 'newsserver'
I go back to the log and it is still saying
mt_shm_remove: WARNING: may not have removed all/correct segments.
I found another of Arts posts that says to try onclean -ky and that looks like
it looked for shame keys but not sure if it did anything.
Any ideas on this one?
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
That worked! Thanks!
Not sure why ontape -r works and ontape -p doesn't work.
Read the manuals. But basically, ontape -p is for "physical" restore for cases
such as setting HDR, ER, etc and you 'll get to that later; to restore, use:
ontape -r Let's go GreenThis email contains 100% recycled electrons.
From: BENJI LONG <ruggedmouse@hotmail.com>
To: ids@iiug.org
Sent: Thursday, September 14, 2017 12:56 PM
Subject: Re: Issues With Restore [39865]
That worked! Thanks!
Not sure why ontape -r works and ontape -p doesn't work.
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
I find those old manuals very confusing,as the Informix server we took over
doesn't do things exactly how it is shown mostly
So now I need to test the restore of both a level 0, and level 1, and then I'm
good to go.
The manuals are unclear here as well.
So my tapedev is set to a path and lets say the name is my_archive
So when I take my level 0, it gets named nameofserver_L0_my_archive
I then run my level 1 backup and named it diffbackup because the way we do our
backups in PROD is to use this command which overwrites the files
ontape -s -L 0 -t STDIO >/opt/informix/full_backup/nameofserver_L0_Archive
In PROD, they don't do differential backups, so every day at 3am, a full
backup is taken. Logs are also taken and backed up.
What brought about this whole exercise is we are under a time limit for some
work this weekend, and I was going to see if I could take a full backup early,
and then a diff backup later so it wouldn't take so much time.
So I run the level 1 backup, and named it diffbackup
When I go to restore, it asks for the level 0, that part now works fine. It
then asks for level1, but the name it gives is I believe coming from tapedev,
and it is expecting the exact name that the level 0 is named, so I can't
figure out how to get around that one.
Any work arounds for that?
Benji,
Sounds like you are mixing ontape command.
Level 0 is being named what is configured in your ONCONFIG.
Level 1 is being written to a file you specify using SDTIO.
From the manual you should be able to restore by using the last example:
Examples
In the following example, ontape performs a physical restore from the file
level_0_archive, which contains the archive previously performed to standard
output:
cat /home/level_0_archive | ontape -p
In the following example, ontape performs a restore of a level-0 archive,
followed by a restore of a level-1 archive:
cat /home/level_0_archive /home/level_1_archive | ontape -r
https://www.ibm.com/support/knowledgecenter/en/SSGU8G_12.1.0/com.ibm.bar.doc/ids
_bar_099.htm
I have not tested this but is should work where you specify both filename in
the cat <lvl0_filename> <lvl1_filename> part of the command.
David Link
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of BENJI
LONG
Sent: Thursday, September 14, 2017 12:26 PM
To: ids@iiug.org
Subject: Re: Issues With Restore [39867]
I find those old manuals very confusing,as the Informix server we took over
doesn't do things exactly how it is shown mostly
So now I need to test the restore of both a level 0, and level 1, and then I'm
good to go.
The manuals are unclear here as well.
So my tapedev is set to a path and lets say the name is my_archive
So when I take my level 0, it gets named nameofserver_L0_my_archive
I then run my level 1 backup and named it diffbackup because the way we do our
backups in PROD is to use this command which overwrites the files ontape -s -L
0 -t STDIO >/opt/informix/full_backup/nameofserver_L0_Archive
In PROD, they don't do differential backups, so every day at 3am, a full
backup is taken. Logs are also taken and backed up.
What brought about this whole exercise is we are under a time limit for some
work this weekend, and I was going to see if I could take a full backup early,
and then a diff backup later so it wouldn't take so much time.
So I run the level 1 backup, and named it diffbackup
When I go to restore, it asks for the level 0, that part now works fine. It
then asks for level1, but the name it gives is I believe coming from tapedev,
and it is expecting the exact name that the level 0 is named, so I can't
figure out how to get around that one.
Any work arounds for that?
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Hi, I ran these two commands
-s -L 0 -t STDIO >/opt/informix/full_backup/nameofserver_L0_Archive
-s -L 1 -t STDIO >/opt/informix/full_backup/diff_backup
Now when I run ontape -r
It says Please mount tape on ./opt/informix/full_backup/nameofserver_L0_Archive
that works perfect because my level 0 is named that in the folder.
Then it says:
Restore a level 1 and I pick yes
it again says
Please mount tape on ./opt/informix/full_backup/nameofserver_L0_Archive
but now I'm stuck because my level 1 backup is named diff_backup.
I can't get in there to rename it with the way the Linux admins have this VM
setup. They tell me that only one window can be accessed at a time.
this didn't work for me...rats
You may be able to enter a ctl-z which will put the ontape into the background.
This will give you a command prompt and then you could do your rename.
And then type "fg" which will bring it back the ontape back into the
foreground..
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of BENJI
LONG
Sent: Thursday, September 14, 2017 1:05 PM
To: ids@iiug.org
Subject: Re: RE: Issues With Restore [39869]
Hi, I ran these two commands
-s -L 0 -t STDIO >/opt/informix/full_backup/nameofserver_L0_Archive
-s -L 1 -t STDIO >/opt/informix/full_backup/diff_backup
Now when I run ontape -r
It says Please mount tape on
../opt/informix/full_backup/nameofserver_L0_Archive
that works perfect because my level 0 is named that in the folder.
Then it says:
Restore a level 1 and I pick yes
it again says
Please mount tape on ./opt/informix/full_backup/nameofserver_L0_Archive
but now I'm stuck because my level 1 backup is named diff_backup.
I can't get in there to rename it with the way the Linux admins have this VM
setup. They tell me that only one window can be accessed at a time.
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
I think this has worked. Thanks! That is awesome
One other option which may be easier than moving files or changing links
(assuming you are using version 12) would be to use onbar and the Informix
Primary Storage Manager.
https://www.ibm.com/support/knowledgecenter/en/SSGU8G_12.1.0/com.ibm.bar.doc/ids
_bar_526.htm
E.g. This can be done by
https://www.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.bar.doc/ids_ba
r_546.htm#ids_bar_example1
The management of the database/log backup files is handled by the storage
manager:
"To restore the instance from the backup objects, use the onbar utility. The
storage manager tracks the backup objects and storage devices for you."
NOTE: You would also need to backup the files which may up the storage manager
catalog.
"Storage catalog tables are not included in a backup. Be sure to back up the
storage catalog tables with your operating system tools as part of a disaster
recovery strategy. If the storage catalog tables are lost, the onbar utility
cannot restore the backup objects that Informix Primary Storage Manager
created. The location of the storage catalog tables is set by the
PSM_CATALOG_PATH configuration parameter (default = $INFORMIXDIR/etc/psm)."
Regards,
David.
> On 14 September 2017 at 19:04 BENJI LONG <ruggedmouse@hotmail.com> wrote:
>
>
> Hi, I ran these two commands
> -s -L 0 -t STDIO >/opt/informix/full_backup/nameofserver_L0_Archive
> -s -L 1 -t STDIO >/opt/informix/full_backup/diff_backup
>
> Now when I run ontape -r
>
> It says Please mount tape on
> ../opt/informix/full_backup/nameofserver_L0_Archive
>
> that works perfect because my level 0 is named that in the folder.
>
> Then it says:
> Restore a level 1 and I pick yes
>
> it again says
> Please mount tape on ./opt/informix/full_backup/nameofserver_L0_Archive
>
> but now I'm stuck because my level 1 backup is named diff_backup.
>
> I can't get in there to rename it with the way the Linux admins have this VM
> setup. They tell me that only one window can be accessed at a time.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
Related threads
- IDS 10 table-level restore
- Informix Development Webinar December 11, 2007
- ontape -p/r with changed ROOTPATH
- Migrate from HP PA-RISC to HP ITANIUM by ontape