Help: renaming chunk on IDS9.40
Posted in 2006
Topics: Backup & Restore, Storage & Space Management
Hi,
I want to run two copies of a database on same machine. The problem I have
is that the second copy has location of rootdbs and other chunks same as
that of the original. I need a utility or program which can rename the
chunks. I know ontape can rename chunks during restore but I can't use it
because I am not using backup/restore for making copies. I am using flash
copy to copy the database at disk level. I want to rename the rootdbs chunk
from
/inf/hrp/rootdbs1 to /inf/hrt/rootdb1.
/inf/hrp/data1 to /inf/hrt/data1.
Where can I find a program or tool which can rename the chunks.
The only method of doing this is to backup and restore with renaming the
chunks. You can do this once for this purpose.
When you copy the chunks are you sure that you are getting a clean copy?
One would either block updates while the copy takes place or break a mirror
(from a 3 way mirror) and copy that mirror, then resync when complete ??
MW
-----Original Message-----
From: informix-list-bounces@iiug.org [mailto:informix-list-bounces@iiug.org]
On Behalf Of Landsonsale.com
Sent: Friday, 17 February 2006 1:54 p.m.
To: informix-list@iiug.org
Subject: Help: renaming chunk on IDS9.40
Hi,
I want to run two copies of a database on same machine. The problem I have
is that the second copy has location of rootdbs and other chunks same as
that of the original. I need a utility or program which can rename the
chunks. I know ontape can rename chunks during restore but I can't use it
because I am not using backup/restore for making copies. I am using flash
copy to copy the database at disk level. I want to rename the rootdbs chunk
from
/inf/hrp/rootdbs1 to /inf/hrt/rootdb1.
/inf/hrp/data1 to /inf/hrt/data1.
Where can I find a program or tool which can rename the chunks.
_______________________________________________
Informix-list mailing list
Informix-list@iiug.org
http://www.iiug.org/mailman/listinfo/informix-list
9.40.xC8 will support renaming chunks with external restore as well.
Same with 10.00.xC5
Murray Wood (IList) (Murray Wood (IList)) schrieb:
> The only method of doing this is to backup and restore with renaming the
> chunks. You can do this once for this purpose.
>
> When you copy the chunks are you sure that you are getting a clean copy?
> One would either block updates while the copy takes place or break a mirror
> (from a 3 way mirror) and copy that mirror, then resync when complete ??
>
> MW
>
> -----Original Message-----
> From: informix-list-bounces@iiug.org [mailto:informix-list-bounces@iiug.org]
> On Behalf Of Landsonsale.com
> Sent: Friday, 17 February 2006 1:54 p.m.
> To: informix-list@iiug.org
> Subject: Help: renaming chunk on IDS9.40
>
> Hi,
> I want to run two copies of a database on same machine. The problem I have
> is that the second copy has location of rootdbs and other chunks same as
> that of the original. I need a utility or program which can rename the
> chunks. I know ontape can rename chunks during restore but I can't use it
> because I am not using backup/restore for making copies. I am using flash
> copy to copy the database at disk level. I want to rename the rootdbs chunk
> from
>
> /inf/hrp/rootdbs1 to /inf/hrt/rootdb1.
> /inf/hrp/data1 to /inf/hrt/data1.
>
> Where can I find a program or tool which can rename the chunks.
>
>
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
Below is the perl script that I use for this purpose. NOTE: Only use it
under the following assumptions. You know what the hell you are doing.
It is not being used for production. Also, I make sure that the before
and after names are the same length. I have never used it for different
length names. Also, because this is a completely braindead substition
if the database path is actually stored in your data it will get
changed by this.
You then have to make a copy of the onconfig file and change the
ROOTPATH variable yourself. I run it on an ontape backup file myself,
but it could work just as "well" with individual chunks. Make sure the
test instance is down of course. You will have to run it against every
chunk in your schema. I don't know if it will work with raw chunks.
Don't use it of course if you can find another way.
#!/usr/bin/perl -p
s:/usr/local/informix_dev/en/maindbs101:/usr/local/informix_dev/en/maindbs001:g;