Restore informix database backup L0
Posted in 2016
User (Informix 11.50) wanted to restore an L0 ontape backup onto the same production machine as a second instance with a different server name and different chunk paths. Answer: use a redirected restore with ontape -r -rename, either listing -p/-o/-n pairs on the command line or via a map file whose lines are "original_path orig_offset new_path new_offset"; set the new ONCONFIG ROOTPATH to the original archived path. Respondents warned this is risky on the production box — omitting any chunk (especially root) silently overwrites production — and suggested generating the rename file from sysmaster:syschunks each time, or restoring to a VM instead.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Storage & Space Management
Hi, I have production database and daily doing L0 backup and require to restore on the same server i.e. production server but different server name and chunks as well. How to restore different chunk same for the L0 restoration. Is there any method to do this Thank you --001a11439ee61dfc37053aaa5a88
Depending on your version you can use the -rename -f <file> option where file contains the before and after chunk paths Cheers Paul -----Original Message----- From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of medkba Sent: Monday, August 22, 2016 10:04 AM To: ids@iiug.org Subject: Restore informix database backup L0 [37636] Hi, I have production database and daily doing L0 backup and require to restore on the same server i.e. production server but different server name and chunks as well. How to restore different chunk same for the L0 restoration. Is there any method to do this Thank you --001a11439ee61dfc37053aaa5a88 **************************************************************************** *** Forum Note: Use "Reply" to post a response in the discussion forum.
Medkba:
Yes, this is called a "redirected restore" in the Backup and Restore Guide
manual. Basically when you do a restore you set up the "new" ONCONFIG file
with ROOTPATH set to the ORIGINAL path that is recorded in the archive (so
from the production server). Then either on the command line or using a
mapping file you map each source server chunk (including the root chunk) to
its new location. Example using ontape:
ontape -r -rename -p /rootchnk -o 0 -n /newroot -o 0 -p /chunk1 -o 0 -n
/chunk1N -o 20000 -rename -p /chunk2 -o 10000 -n /chunk2N -o 0
Using a map file:
ontape -r -rename -f mapfile
The contents of the mapfile file are:
/rootchnk 0 /newroot 0
/chunk1 0 /chunk1N 20000
/chunk2 10000 /chunk2N 0
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 Mon, Aug 22, 2016 at 11:03 AM, medkba <medkba@gmail.com> wrote:
> Hi,
>
> I have production database and daily doing L0 backup and require to restore
> on the same server i.e. production server but different server name and
> chunks as well. How to restore different chunk same for the L0
> restoration. Is there any method to do this
>
> Thank you
>
> --001a11439ee61dfc37053aaa5a88
>
>
> ************************************************************
> *******************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a114452b835631c053aaa8fd9
Assuming you're on a version with rename chunks restore the answer is yes... But I suggest you consider a different machine (can't you create a VM for it?) rename restore is good... but if you add a chunk in the production database and forget to add that chunk to the rename file or command, it will silently overwrite your production database and your production database will become corrupted. Not a nice thing to happen.... and I've seen it happen.... so be very careful... And in the future always post your Informix version in the question. Regards. On Mon, Aug 22, 2016 at 4:03 PM, medkba <medkba@gmail.com> wrote: > Hi, > > I have production database and daily doing L0 backup and require to restore > on the same server i.e. production server but different server name and > chunks as well. How to restore different chunk same for the L0 > restoration. Is there any method to do this > > Thank you > > --001a11439ee61dfc37053aaa5a88 > > > ************************************************************ > ******************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > -- Fernando Nunes Portugal http://informix-technology.blogspot.com My email works... but I don't check it frequently... --001a113f8aae5586b0053aaab82a
Art,
Thank you very much
I have restore L0 backup using command ontape -r and then showing my
current chunk information and then continue restore.
If I use the file as below
ontape -r -rename -f listfile
listfile - may i know content of the file syntax
On Mon, Aug 22, 2016 at 11:18 PM, Art Kagel <art.kagel@gmail.com> wrote:
> Medkba:
>
> Yes, this is called a "redirected restore" in the Backup and Restore Guide
> manual. Basically when you do a restore you set up the "new" ONCONFIG file
> with ROOTPATH set to the ORIGINAL path that is recorded in the archive (so
> from the production server). Then either on the command line or using a
> mapping file you map each source server chunk (including the root chunk) to
> its new location. Example using ontape:
>
> ontape -r -rename -p /rootchnk -o 0 -n /newroot -o 0 -p /chunk1 -o 0 -n
> /chunk1N -o 20000 -rename -p /chunk2 -o 10000 -n /chunk2N -o 0>
> Using a map file:
>
> ontape -r -rename -f mapfile>
> The contents of the mapfile file are:
> /rootchnk 0 /newroot 0
> /chunk1 0 /chunk1N 20000
> /chunk2 10000 /chunk2N 0
>
> 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 Mon, Aug 22, 2016 at 11:03 AM, medkba <medkba@gmail.com> wrote:
>
> > Hi,
> >
> > I have production database and daily doing L0 backup and require to
> restore
> > on the same server i.e. production server but different server name and
> > chunks as well. How to restore different chunk same for the L0
> > restoration. Is there any method to do this
> >
> > Thank you
> >
> > --001a11439ee61dfc37053aaa5a88
> >
> >
> > ************************************************************
> > *******************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --001a114452b835631c053aaa8fd9
>
>
> ************************************************************
> *******************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a1143d88c50c7e5053aaabd1e
Sorry Fernando Nunes. my version is 11.50. I don't have new server to do this. This is HP Titanium server. What other risk if doing this way? Thank you very much On Mon, Aug 22, 2016 at 11:29 PM, Fernando Nunes <domusonline@gmail.com> wrote: > Assuming you're on a version with rename chunks restore the answer is > yes... But I suggest you consider a different machine (can't you create a > VM for it?) > rename restore is good... but if you add a chunk in the production database > and forget to add that chunk to the rename file or command, it will > silently overwrite your production database and your production database > will become corrupted. > Not a nice thing to happen.... and I've seen it happen.... so be very > careful... > > And in the future always post your Informix version in the question. > > Regards. > > On Mon, Aug 22, 2016 at 4:03 PM, medkba <medkba@gmail.com> wrote: > > > Hi, > > > > I have production database and daily doing L0 backup and require to > restore > > on the same server i.e. production server but different server name and > > chunks as well. How to restore different chunk same for the L0 > > restoration. Is there any method to do this > > > > Thank you > > > > --001a11439ee61dfc37053aaa5a88 > > > > > > ************************************************************ > > ******************* > > Forum Note: Use "Reply" to post a response in the discussion forum. > > > > > > -- > Fernando Nunes > Portugal > > http://informix-technology.blogspot.com > My email works... but I don't check it frequently... > > --001a113f8aae5586b0053aaab82a > > > ************************************************************ > ******************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --001a11440306ac85c0053aaac5f9
See this link for syntax of the rename file:
https://www.ibm.com/support/knowledgecenter/SSGU8G_11.70.0/com.ibm.bar.doc/ids_b
ar_497.htm
Marcus Haarmann
----- Ursprüngliche Mail -----
Von: "medkba" <medkba@gmail.com>
An: ids@iiug.org
Gesendet: Montag, 22. August 2016 17:32:48
Betreff: Re: Restore informix database backup L0 [37640]
Art,
Thank you very much
I have restore L0 backup using command ontape -r and then showing my
current chunk information and then continue restore.
If I use the file as below
ontape -r -rename -f listfile
listfile - may i know content of the file syntax
On Mon, Aug 22, 2016 at 11:18 PM, Art Kagel <art.kagel@gmail.com> wrote:
> Medkba:
>
> Yes, this is called a "redirected restore" in the Backup and Restore Guide
> manual. Basically when you do a restore you set up the "new" ONCONFIG file
> with ROOTPATH set to the ORIGINAL path that is recorded in the archive (so
> from the production server). Then either on the command line or using a
> mapping file you map each source server chunk (including the root chunk) to
> its new location. Example using ontape:
>
> ontape -r -rename -p /rootchnk -o 0 -n /newroot -o 0 -p /chunk1 -o 0 -n
> /chunk1N -o 20000 -rename -p /chunk2 -o 10000 -n /chunk2N -o 0>
> Using a map file:
>
> ontape -r -rename -f mapfile>
> The contents of the mapfile file are:
> /rootchnk 0 /newroot 0
> /chunk1 0 /chunk1N 20000
> /chunk2 10000 /chunk2N 0
>
> 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 Mon, Aug 22, 2016 at 11:03 AM, medkba <medkba@gmail.com> wrote:
>
> > Hi,
> >
> > I have production database and daily doing L0 backup and require to
> restore
> > on the same server i.e. production server but different server name and
> > chunks as well. How to restore different chunk same for the L0
> > restoration. Is there any method to do this
> >
> > Thank you
> >
> > --001a11439ee61dfc37053aaa5a88
> >
> >
> > ************************************************************
> > *******************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --001a114452b835631c053aaa8fd9
>
>
> ************************************************************
> *******************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a1143d88c50c7e5053aaabd1e
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
This will work in 11.50 BTW. The format for the file is:
original_path orig_offset new_path new_offset
Be careful, as Fernando points out, to include every chunk (especially the
root chunk) or you could easily trash your production system and not know
it for hours or even longer.
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 Mon, Aug 22, 2016 at 11:32 AM, medkba <medkba@gmail.com> wrote:
> Art,
>
> Thank you very much
>
> I have restore L0 backup using command ontape -r and then showing my
> current chunk information and then continue restore.
>
> If I use the file as below
> ontape -r -rename -f listfile>
> listfile - may i know content of the file syntax
>
> On Mon, Aug 22, 2016 at 11:18 PM, Art Kagel <art.kagel@gmail.com> wrote:
>
> > Medkba:
> >
> > Yes, this is called a "redirected restore" in the Backup and Restore
> Guide
> > manual. Basically when you do a restore you set up the "new" ONCONFIG
> file
> > with ROOTPATH set to the ORIGINAL path that is recorded in the archive
> (so
> > from the production server). Then either on the command line or using a
> > mapping file you map each source server chunk (including the root chunk)
> to
> > its new location. Example using ontape:
> >
> > ontape -r -rename -p /rootchnk -o 0 -n /newroot -o 0 -p /chunk1 -o 0 -n
> > /chunk1N -o 20000 -rename -p /chunk2 -o 10000 -n /chunk2N -o 0> >
> > Using a map file:
> >
> > ontape -r -rename -f mapfile> >
> > The contents of the mapfile file are:
> > /rootchnk 0 /newroot 0
> > /chunk1 0 /chunk1N 20000
> > /chunk2 10000 /chunk2N 0
> >
> > 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 Mon, Aug 22, 2016 at 11:03 AM, medkba <medkba@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > I have production database and daily doing L0 backup and require to
> > restore
> > > on the same server i.e. production server but different server name and
> > > chunks as well. How to restore different chunk same for the L0
> > > restoration. Is there any method to do this
> > >
> > > Thank you
> > >
> > > --001a11439ee61dfc37053aaa5a88
> > >
> > >
> > > ************************************************************
> > > *******************
> > > Forum Note: Use "Reply" to post a response in the discussion forum.
> > >
> > >
> >
> > --001a114452b835631c053aaa8fd9
> >
> >
> > ************************************************************
> > *******************
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
> >
>
> --001a1143d88c50c7e5053aaabd1e
>
>
> ************************************************************
> *******************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a1144c0d6d412a9053aae572e
as Fernando states its extremely risky using rename restore on the production server to implement another instance. Best to create a new rename file each time you restore and when building the rename file create a script that first selects the chunk path names from sysmaster:syschunks (along with the offsets* page size/1024 ) into that file and edit the file accordingly. Mark
On Tue, Aug 23, 2016 at 3:09 PM, MARK JALKIEWICZ < mark.jalkiewicz@verizon.net> wrote: > as Fernando states its extremely risky using rename restore on the > production > server to implement another instance. Best to create a new rename file each > time you restore and when building the rename file create a script that > first > selects the chunk path names from sysmaster:syschunks (along with the > offsets* > page size/1024 ) into that file and edit the file accordingly. > Good point! > > Mark > > > ************************************************************ > ******************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > -- Fernando Nunes Portugal http://informix-technology.blogspot.com My email works... but I don't check it frequently... --001a114481f00bb745053abf3caf
Ok, thank you for all your input On Tue, Aug 23, 2016 at 11:58 PM, Fernando Nunes <domusonline@gmail.com> wrote: > On Tue, Aug 23, 2016 at 3:09 PM, MARK JALKIEWICZ < > mark.jalkiewicz@verizon.net> wrote: > > > as Fernando states its extremely risky using rename restore on the > > production > > server to implement another instance. Best to create a new rename file > each > > time you restore and when building the rename file create a script that > > first > > selects the chunk path names from sysmaster:syschunks (along with the > > offsets* > > page size/1024 ) into that file and edit the file accordingly. > > > > Good point! > > > > > Mark > > > > > > ************************************************************ > > ******************* > > Forum Note: Use "Reply" to post a response in the discussion forum. > > > > > > -- > Fernando Nunes > Portugal > > http://informix-technology.blogspot.com > My email works... but I don't check it frequently... > > --001a114481f00bb745053abf3caf > > > ************************************************************ > ******************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --94eb2c18f43cf74f6d053abf4480