Sybase Adaptive Server IQ 12.4.2 Administration And Performance Manual page 422

Table of Contents

Advertisement

Restoring your databases
Example 3 — Moving
a user dbspace
402
Relative pathnames in the
database or dbspace: the main IQ Store dbspace, Temporary Store dbspaces,
and Message Log are restored relative to the location of db_file (the Catalog
Store); user-created IQ Store dbspaces are restored relative to the directory that
holds the main IQ dbspace.
If you are renaming files while restoring both full and incremental backups, be
sure you use the dbspace names and paths consistently throughout the set of
restores. It is the safest way to ensure that files are renamed correctly.
If a dbspace was added between the full backup and an incremental backup,
and you are renaming database files, you need one more
the incremental restore than for the full restore. Similarly, if a dbspace was
deleted between backups, you need one fewer
from any backups that occurred after the dbspace was deleted.
See "Recording dbspace names" for information on how to obtain a list of the
dbspace names in your database, so that you will know the correct names to
include in
clauses.
RENAME
This example shows how you restore the full and incremental backups in
example shown earlier in this chapter. In this case, media failure has made a
UNIX raw partition unusable. The user-defined dbspace on that raw partition,
, must be moved to a new raw partition, /dev/rdsk/c1t5d2s1. No other
IQ_USER
database files are affected.
First, you connect to the
from two tape devices. In this case they are the same two tape devices used to
make the backup, but the devices could differ as long as you use the same
number of archive devices, the same media type (tape or disk), and the same
tape sets in the correct order, as described in "Restoring in the correct order".
The first
command is:
RESTORE
RESTORE DATABASE 'asiquser'
FROM '/dev/rmt/0n'
FROM '/dev/rmt/1n'
RENAME IQ_SYSTEM_MAIN TO '/dev/rdsk/c2t0d1s1'
RENAME IQ_SYSTEM_TEMP TO '/dev/rdsk/c2t1d1s1'
RENAME IQ_SYSTEM_MSG TO 'asiquser.iqmsg'
RENAME IQ_USER TO '/dev/rdsk/c1t5d2s1'
The second
command, to restore the incremental backup, is:
RESTORE
RESTORE DATABASE 'asiquser'
FROM '/dev/rmt/0n'
RENAME IQ_SYSTEM_MAIN TO '/dev/rdsk/c2t0d1s1'
RENAME IQ_SYSTEM_TEMP TO '/dev/rdsk/c2t1d1s1'
clause work as they do when you create a
RENAME
RENAME
database. Then you restore the full backup
utility_db
clause for
RENAME
clause for the restores

Advertisement

Table of Contents
loading

Table of Contents