Dev server restore fails
Posted in 2017
A user backing up with ontape to STDIO couldn't restore: his 'ontape -r -D rootdbs...' failed because ontape has no -D dbspace option (that's onbar) and it looked for a differently named device file. Art Kagel's suggestion of 'ontape -r -t STDIO < /path/to/DB1_L0_Archive' worked. The user then found no logical log restore occurred; David noted that with STDIO there is no log salvage/logical restore prompt, so you must take a separate logical log backup and restore in two steps ('-p -t STDIO' then '-l -t STDIO'). The user's final question about the exact -l command (he got "There are no DBSpaces to recover") is left unanswered in the thread.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Backup & Restore, Storage & Space Management
I'm on a dev server that I just recently got going, and I'm playing around
with backups and restores, but the restore will not work for me. My script
backs up with STDIO. Does that make a difference in how I attempt to do the
restore?
I backed up a level 0, and it is called DB1_L0_Archive. I can see that file in
the full_backup directory. For some reason it is saying the file cannot be
found, but it isn't even showing the correct name...
When I try to restore with ontape -r -D rootdbs tmdbs logdbs
it fails with:
Restore will use level 0 archive file
/opt/informix/full_backkup.localhost.localdomain_1_L0
I press return to continue and it says:
File /opt/informix/full_backup/localhost.localdomain_1_L0 not found, continuing
Physical restore failed - function open tape device /opt/informix/full_backup/
failed code -1 errno 2
You have DB1_L0_Archive, it needs localhost.localdomain_1_L0 - maybe try
renaming the file ?
Cheers
Paul
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of BENJI
LONG
Sent: Wednesday, April 19, 2017 9:01 AM
To: ids@iiug.org
Subject: Dev server restore fails [38984]
I'm on a dev server that I just recently got going, and I'm playing around
with backups and restores, but the restore will not work for me. My script
backs up with STDIO. Does that make a difference in how I attempt to do the
restore?
I backed up a level 0, and it is called DB1_L0_Archive. I can see that file
in
the full_backup directory. For some reason it is saying the file cannot be
found, but it isn't even showing the correct name...
When I try to restore with ontape -r -D rootdbs tmdbs logdbs
it fails with:
Restore will use level 0 archive file
/opt/informix/full_backkup.localhost.localdomain_1_L0
I press return to continue and it says:
File /opt/informix/full_backup/localhost.localdomain_1_L0 not found,
continuing
Physical restore failed - function open tape device
/opt/informix/full_backup/
failed code -1 errno 2
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
Ontape doesn't accept the -D <dbspacelist> option, only onbar does. Ontape
only does full server backups and restores.
Also try it this way:
ontape -r -t STDIO </path/to/DB1_L0_Archive
Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
www.askdbmgt.com
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on the IIUG, nor any other organization with which I am
associated either explicitly, implicitly, or by inference. Neither do
those opinions reflect those of other individuals affiliated with any
entity with which I am affiliated nor those of the entities themselves.
On Wed, Apr 19, 2017 at 10:01 AM, BENJI LONG <ruggedmouse@hotmail.com>
wrote:
> I'm on a dev server that I just recently got going, and I'm playing around
> with backups and restores, but the restore will not work for me. My script
> backs up with STDIO. Does that make a difference in how I attempt to do the
> restore?
>
> I backed up a level 0, and it is called DB1_L0_Archive. I can see that
> file in
> the full_backup directory. For some reason it is saying the file cannot be
> found, but it isn't even showing the correct name...
>
> When I try to restore with ontape -r -D rootdbs tmdbs logdbs
>
> it fails with:
> Restore will use level 0 archive file
> /opt/informix/full_backkup.localhost.localdomain_1_L0
>
> I press return to continue and it says:
> File /opt/informix/full_backup/localhost.localdomain_1_L0 not found,
> continuing
> Physical restore failed - function open tape device
> /opt/informix/full_backup/
> failed code -1 errno 2
>
>
> ************************************************************
> *******************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a1147b198444b52054d85993f
Ok, I didn't realize the difference from onbar to ontape. So your command
worked.
In the onstat -m, it says "No logical log restore will be performed".
I just did the level 0 backup before retrying. Is that why no logs were
restored? i.e., because there weren't any to restore?
Assuming ontape then when it said restore logical logs y/n you said no
Cheers
Paul
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of BENJI
LONG
Sent: Wednesday, April 19, 2017 9:28 AM
To: ids@iiug.org
Subject: Re: Dev server restore fails [38988]
Ok, I didn't realize the difference from onbar to ontape. So your command
worked.
In the onstat -m, it says "No logical log restore will be performed".
I just did the level 0 backup before retrying. Is that why no logs were
restored? i.e., because there weren't any to restore?
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
it didn't even ask me that. This is version 11.5 if that makes a difference.
Hi,
I have done restore using ontape. Asking logical log restore (Y/N)
On 19 Apr 2017 10:33 p.m., "BENJI LONG" <ruggedmouse@hotmail.com> wrote:
> it didn't even ask me that. This is version 11.5 if that makes a
> difference.
>
>
> ************************************************************
> *******************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a11350ea8f46b6c054d85fb07
My guess is the stdio is being redirected - it should be asking
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of medkba
Sent: Wednesday, April 19, 2017 9:39 AM
To: ids@iiug.org
Subject: Re: RE: Dev server restore fails [38993]
Hi,
I have done restore using ontape. Asking logical log restore (Y/N)
On 19 Apr 2017 10:33 p.m., "BENJI LONG" <ruggedmouse@hotmail.com> wrote:
> it didn't even ask me that. This is version 11.5 if that makes a
> difference.
>
>
> ************************************************************
> *******************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a11350ea8f46b6c054d85fb07
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
If you want the restore to be as of the beginning of the archive then say
"n"o then run onmode -m to complete fast recovery bring the server fully
online. After that you can shutdown and restart the server if you want to
get rid of the '-r' flags on the oninits in memory.
On the other hand if you want to server to be restored to the last
completed transaction then you will need to restore the logical logs from
the logical log backups, so say 'y'es and follow the instructions.
Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
www.askdbmgt.com
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on the IIUG, nor any other organization with which I am
associated either explicitly, implicitly, or by inference. Neither do
those opinions reflect those of other individuals affiliated with any
entity with which I am affiliated nor those of the entities themselves.
On Wed, Apr 19, 2017 at 10:39 AM, medkba <medkba@gmail.com> wrote:
> Hi,
>
> I have done restore using ontape. Asking logical log restore (Y/N)
>
> On 19 Apr 2017 10:33 p.m., "BENJI LONG" <ruggedmouse@hotmail.com> wrote:
>
> > it didn't even ask me that. This is version 11.5 if that makes a
> > difference.
> >
> >
> > ************************************************************
> > *******************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --001a11350ea8f46b6c054d85fb07
>
>
> ************************************************************
> *******************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--94eb2c1bf2da1748ef054d862368
If you are using -t STDIO in the restore command then:
https://www.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.bar.doc/ids_ba
r_099.htm
"Restoring from standard input differs from restoring from tapes in the
following ways:
No logical restore or logical log salvage occurs.
To perform a logical restore, use the ontape -l command after the physical
restore."
You will need to perform 2 backups with ontape
- a level 0 backup
- then a logical log backup
For restores rather than -r use "-p -t STDIO" to do the physical restore of
the first backup.
Then use "-l -t STDIO" to do the logical restore of the 2nd (logical log)
backup.
Regards,
David.
> On 19 April 2017 at 15:33 BENJI LONG <ruggedmouse@hotmail.com> wrote:
>
>
> it didn't even ask me that. This is version 11.5 if that makes a difference.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
when you say to use -l -t STDIO, what is the complete command for that?
I did a ontape -p and that restored everything except my logical log "I
think". Now I want to restore the logical log which I backed up to a file
before the restore.
I tried a number of things but it said There are no DBSpaces to recover.