symbolic link for restore
Posted in 2008
Topics: Backup & Restore, Storage & Space Management, Platform-Specific Issues, Versions, Editions & End-of-Life
Hi,
I need to do ontape backup on one instance and restore on another instance on
the same box. In order to be able to do restore I understand dbspaces need to
match in name and size. The problem is if my first instance has dbspace
created like this /DB/cis13data , how can I create another raw space
/DB/cis13data for another instance. Do I need to create symbolic link...don't
know what that is and if that needs to be applied in this case. Can you answer
my question as to how I can I create raw space when that raw space already
exists for first instance. Can I create different volume groups so they are
not in same dir. Hope I am not confusing you. We are on IDS 10.0 FC7 with
hp-ux platform.
please help asap...
Thanks in advance,
Sunita Raina
Hi,
don't worry, I'm not confused by your e-mail.
But you are a bit confused, I think ... ;)
To clarify a few things here ...:
- It is the "chunks", not the "dbspaces", that cause the problem.
"Chunk" is in Informix parlance the thing that has a physical location
on disk, namely a path name and an offset (possibly other than 0).
("Dbspace" is a logical thing used by DBA's and therefore
kind of detached from the physical meaning of chunks, The chunks
are a concern for the System DBA ...)
- The path names are absolute path names, they begin with the / of the
root directory. Therefore you cannot have the same path name twice
on the same system. Regarding this it does not matter at all whether
the path name is that of a real file or device, or that of a symbolic
link.
- The chunks in a backup have their absolute path names and their
offset in the backup. Restoring the backup as it is will use this path
name and offset just as it was when the backup happened.
Therefore it will overwrite existing chunks.
- The recommendations regarding links is usually correct. But they are
not the vehicle for cloning an IDS instance on the same system,
because links also have absolute path names.
They are used to be able to change the disk location where they
point to (e.g. a different disk after a disk crash) while keeping the
same absolute path name (namely of the link itself).
That way you can move the disk location without needing to
change something inside IDS because IDS uses the link's path
name (which stays the same). Only the location where the link
points to will be changed. All this needs to be done manually by
the System DBA.
But you can't have 2 links with the same absolute path
name but pointing to different locations.
What you need to do:
- you need to do a restore with "chunk rename". See the "-rename"
option of the ontape utility.
- read about all this in the Backup and Restore Guide.
- since you will need to rename all chunks of the system (as you want
to restore to a different instance but on the same box), you may want to
consider the option to put the renaming of all the chunks into a file.
Then use this file for the ontape restore command (rather than listing
all the chunk renaming on the command line).
- a chunk's location is defined by the combination of path name and
offset. So when renaming the chunks you have to be careful that the
combination of the two is unique for each chunk (of both instances).
When using offsets other than zero make sure that you calculate
them correctly, i.e. taking into account the sizes of chunks that are
already existing on a particular path name.
Another possibility, but not recommended:
- you could use relative path names (instead of absolute path names)
for all the chunks. They would begin with ../
- you would have to setup the original system in that way ... too late now
anyway.
- you then could restore without the chunk rename, just making sure
you are for all operations of each instance in the right subdirectory,
so
that the relative path names match correctly.
- all this is very error prone and could easily destroy all your data.
That is why I don't recommend it. I just mention it so that you know
what it is in case someone else tells you about it. :)
Regards,
Martin
--
Martin Fuerderer
IBM Informix Development Munich, Germany
Information Management
IBM Deutschland GmbH
Chairman of the Supervisory Board: Hans Ulrich Märki
Board of Management: Martin Jetter (Chairman), Rudolf Bauer, Christian
Diedrich, Christoph Grandpierre, Matthias Hartmann, Thomas Fell, Michael
Diemer
Corporate Seat: Stuttgart, Germany; Reg.-Gericht: Amtsgericht Stuttgart,
HRB-Nr.: 14 562 WEEE-Reg.-Nr. DE 99369940
ids-bounces@iiug.org wrote on 31.01.2008 19:48:52:
> Hi,
>
> I need to do ontape backup on one instance and restore on another
instance on
> the same box. In order to be able to do restore I understand dbspaces
need to
> match in name and size. The problem is if my first instance has dbspace
> created like this /DB/cis13data , how can I create another raw space
> /DB/cis13data for another instance. Do I need to create symbolic
link...don't
> know what that is and if that needs to be applied in this case. Can
> you answer
> my question as to how I can I create raw space when that raw space
already
> exists for first instance. Can I create different volume groups so they
are
> not in same dir. Hope I am not confusing you. We are on IDS 10.0 FC7
with
> hp-ux platform.
>
> please help asap...
>
> Thanks in advance,
> Sunita Raina
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
> See you at the IIUG Informix 2008 Conference
> The Power Conference for Informix Professionals
> April 27 - 30, 2008 Marriott Overland Park (Kansas City), Kansas
> http://www.iiug.org/conf
> Registration Now Open!!