dbTalk Databases Forums  

Recover checkpoint to server with different locations

comp.databases.ingres comp.databases.ingres


Discuss Recover checkpoint to server with different locations in the comp.databases.ingres forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Ingres Forums
 
Posts: n/a

Default Re: Recover checkpoint to server with different locations - 11-29-2011 , 09:45 AM






Thank you very much Jeremy, it is more appreciated than I can express in
words. If I further develop my own future version, I'll be more than
happy to share it with Ingres community.

Thanks again and have a great day,
Kyle


--
kylehanson

Reply With Quote
  #12  
Old   
Robert Allely
 
Posts: n/a

Default Re: [Info-Ingres] Recover checkpoint to server withdifferent locations - 11-29-2011 , 01:39 PM






I have been watching this discussion - just glad we have the luxury(?) of being able to create the DR installation with the exact same locations as the production installation. We used symbolic links in a previous server but this is much simpler.

Robert

-----Original Message-----
From: info-ingres-bounces (AT) kettleriver...ting (DOT) com [mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of Ingres Forums
Sent: Wednesday, 30 November 2011 4:45 a.m.
To: info-ingres (AT) kettleriverconsulting (DOT) com
Subject: Re: [Info-Ingres] Recover checkpoint to server with different locations


Thank you very much Jeremy, it is more appreciated than I can express in
words. If I further develop my own future version, I'll be more than
happy to share it with Ingres community.

Thanks again and have a great day,
Kyle


--
kylehanson


_______________________________________________
Info-Ingres mailing list
Info-Ingres (AT) kettleriverconsulting (DOT) com
http://ext-cando.kettleriverconsulti...fo/info-ingres
Confidentiality/Privilege Notice:
This communication is confidential and may be legally privileged. If you are not the intended recipient please delete the message and notify the sender at Ports of Auckland Limited. Any use, disclosure, copying, distribution or retention of this communication is strictly prohibited.

Reply With Quote
  #13  
Old   
Martin Bowes
 
Posts: n/a

Default Re: [Info-Ingres] Recover checkpoint to server withdifferent locations - 11-30-2011 , 04:17 AM



Hi Kyle

Heres a perl class which can amongst other things edit existing locations in a configuration file.

It has a few dependencies which will break out of the box for you, but should point you in the right direction. It handles an Ingres 9 and 10 Configuration file.

Its intended to be used like this....

$CNF=Ed_Config->new;
unless ($Infodb=$CNF->Read_Config_File(
File => $Source_Config
))
{
die "Failed to read source config file: $Source_Config\n";
};

$Infodb is now a class object. Its also a hash with lots of details read from the named configuration file.

unless($Infodb->Edit_Location(
Location => $location,
Path => $Edit_Locations{$location}{New}
))
{
die "$DRP->{Program}: Invalid location change details!",
join("\n", @{$Infodb->{Errors}}), "\n";
};

The Edit_Location() method does not edit the actual config file. It alters the in-memory version.

And then if your really gutsy you can write the edited configuration file back to a new file (not the original...do you think I'm insane?)
unless ($Infodb->Write_Back(File => "${CNF_File}.edt"))
{
die $DRP->{Program}: Failed to write back edited data config file.",
join("\n", @{$Infodb->{Errors}}), "\n";
};

It's a work in progress.

Marty

-----Original Message-----
From: Ingres Forums [mailto:info-ingres (AT) kettleriverconsulting (DOT) com]
Sent: 29 November 2011 13:57
To: info-ingres (AT) kettleriverconsulting (DOT) com
Subject: Re: [Info-Ingres] Recover checkpoint to server with different locations


I'd be very grateful if someone has program source that they'd be
willing to share which reads/allows changes to the aaaaaaaa.cnf file...
Can anyone answer how static this files format is from Ingres version
to version?


--
kylehanson


_______________________________________________
Info-Ingres mailing list
Info-Ingres (AT) kettleriverconsulting (DOT) com
http://ext-cando.kettleriverconsulti...fo/info-ingres

Reply With Quote
  #14  
Old   
Martin Bowes
 
Posts: n/a

Default Re: [Info-Ingres] Recover checkpoint to server withdifferent locations - 11-30-2011 , 04:39 AM



Hi Kyle,

I've never tried the relocatedb style you mentioned...why not give it a try and let us know how you get on.

But it sounds like the symlink option on your DR box is viable. All you need is to get root to do:

mkdir /Ingres
cd /Ingres
ln -s /opt/IngresII ing_prod

Afterwards on your DR box any reference to the production path /Ingres/ingres_prod/ingres/data/default/dbname will actually traverse the equivalent DR path /opt/IngresII/ingres/data/default/dbname

You need to ensure that every location that is used on your prod box has an identical name on your DR box.

So if your prod box has data location names ii_database, ii_database_2, ii_database_3...then these names also exist on your DR box. Ditto for checkpoint, journal, dump work and auxilliary work locations.

Now just create the empty database on the DR host, using the same location names as on the prod host. Checkpoint the database and turn journaling on (assuming its on in the prod version).

You should now be in a position to copy over the config files from the prod host....as a tip ALWAYS save the original DR versions aside before this. Ditto copy in the checkpoint, journal and dump files. The latter include [dc]*.dmp...you need these!

Do an infodb ... check it now looks like the prod version. Check each path mentioned in the output can be accessed.

Do the rollforwarddb

Do alterdb -u... dbname -disable_journaling
then ckpdb +j dbname.

These last two steps are necessary to get the log file on the DR host to play ball. Otherwise you'll find the recovered database marked inconsistent real soon. If the database is too large to want to do a full ckpdb +j, I can show you how to monkey with a cktmpl.def to allow it to do this step without actually taking a backup...just doing the '+j' bit.

Marty


-----Original Message-----
From: Ingres Forums [mailto:info-ingres (AT) kettleriverconsulting (DOT) com]
Sent: 29 November 2011 12:55
To: info-ingres (AT) kettleriverconsulting (DOT) com
Subject: Re: [Info-Ingres] Recover checkpoint to server with different locations


Thanks everyone for your replies. It helps confirm the situation that
I figured I'm in, of which is changing locations within a checkpoint is
not really meant to be.

Is there any chance using 'relocatedb --location --newlocation' type
command could help. Here's the overview of what I'm thinking:
- I have a checkpoint from production server I'd like to
recover(it has say 20 data locations all mapped high in folder tree
under /INGRES/ing_prod)
- On the DR box, I've created an empty DB of which I want to
recover this checkpoint.
- This DR box also has about 20 locations but they're all mapped
with a different high folder path of: /opt/IngresII
- Pull over the aaaaaaaa.cnf from the production box to the DR
box
- setup 20 new data locations on DR box to match folder paths
within aaaaaaaa.cnf from production
- use relocatedb -location= -newlocation= to change
aaaaaaaa.cnf to use new locations

I haven't any experience with relocatedb, so I'm hoping it adjusts the
aaaaaaaa.cnf file locations, so maybe your thoughts on this and the
above scenario if it'd get me close to working. I guess if the above
could work, the last laundry item I have is the default data location
because these are different folder paths as well.

New installation definitely sounds the way to go... Thanks again for
your help.


--
kylehanson


_______________________________________________
Info-Ingres mailing list
Info-Ingres (AT) kettleriverconsulting (DOT) com
http://ext-cando.kettleriverconsulti...fo/info-ingres

Reply With Quote
  #15  
Old   
Ingres Forums
 
Posts: n/a

Default Re: Recover checkpoint to server with different locations - 11-30-2011 , 06:35 AM



We've decided to put together a new DR box and create identical folders,
locations, etc... I'm still amazed to this day that I've been working
with Ingres database for 19 years and yet these hard-coded paths have
not found a better solution.


--
kylehanson

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.