Restore to new server.

Squeak Smalltalk

Restore to new server.
Hi,

I need to restore a online back to a new server.
I have
1- the logfile
2- the online backup.
Do I need something more ?

The plan was
a- Install db2 on the machine
b- create the instance
c- create the database with "db2 create database Old_db_name" ( for
the moment I do not have the total create statement for the old db. I
can probably fix it)
d- do the restore. " db2 RESTORE DATABASE Old_db_name FROM . TAKEN AT
'20051221080102' INTO Old_db_name"; "

I have this problem.
SQL2523W Warning! Restoring to an existing database that is
different from the database on the backup image, but have matching
names. The target database will be overwritten by the backup version.
The Roll-forward recovery logs associated with the target database
will be deleted.
Do you want to continue ? (y/n) y
SQL0970N The system attempted to write to a read-only file. SQLSTATE=55009

Any advice ?

B.R
W.

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Ian Davies

Re: Restore to new server.
(in response to Squeak Smalltalk)
Well that's just so happens to be what we're doing at the moment :-)

The SQL0970N is probably because the instance userid of the new system
does not have permission to create the new container or the target
container layout has changed. If the target directory structure is the
same as the source then you do not need to use the "set tablespace
containers", "restore redirect" or the "restore continue".

Here's an example, includes a database rename and remapping the
containers:

aix1:
db2 backup db abpd online to /dbawork1/abpd include logs
--original database on /u01/DB2/inst1

aix2:
--don't need to pre-create the new database
db2 restore db abpd from /dbawork2/abpd into abpdp1 logtarget
/dbawork2/abpd redirect
db2 set tablespace containers for 0
using( path '/u01/DB2/inst2/NODE0000/SQL00001/SQLT0000.0');
db2 set tablespace containers for 1
using( path '/u01/DB2/inst2/NODE0000/SQL00001/SQLT0001.0');
<snip>

db2 restore db abpd continue
db2 rollforward db abpdp1 complete
--check message for timestamp
db2 "rollforward db abpdp1 to 2005-12-22-22.08.11.000000 and complete
overflow log path (/dbawork2/abpd)"
db2 catalog db abpdp1 as abpd

Cheers,
Ian.

-----Original Message-----
From: DB2 Data Base Discussion List [mailto:[login to unmask email] On
Behalf Of Squeak Smalltalk
Sent: Friday - December 23, 2005 01:40
To: [login to unmask email]
Subject: [DB2-L] Restore to new server.


Hi,

I need to restore a online back to a new server.
I have
1- the logfile
2- the online backup.
Do I need something more ?

The plan was
a- Install db2 on the machine
b- create the instance
c- create the database with "db2 create database Old_db_name" ( for
the moment I do not have the total create statement for the old db. I
can probably fix it)
d- do the restore. " db2 RESTORE DATABASE Old_db_name FROM . TAKEN AT
'20051221080102' INTO Old_db_name"; "

I have this problem.
SQL2523W Warning! Restoring to an existing database that is
different from the database on the backup image, but have matching
names. The target database will be overwritten by the backup version.
The Roll-forward recovery logs associated with the target database
will be deleted.
Do you want to continue ? (y/n) y
SQL0970N The system attempted to write to a read-only file.
SQLSTATE=55009

Any advice ?

B.R
W.

------------------------------------------------------------------------
---------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and
home page at http://www.idugdb2-l.org/archives/db2-l.html. From that
page select "Join or Leave the list". The IDUG DB2-L FAQ is at
http://www.idugdb2-l.org. The IDUG List Admins can be reached at
[login to unmask email] Find out the latest on IDUG conferences
at http://conferences.idug.org/index.cfm

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Philip Gunning

Re: Restore to new server.
(in response to Ian Davies)
That's normal. Add REPLACE EXISTING to the restore and put the logs in OVER
FLOW LOG PATH. Phil



From: DB2 Data Base Discussion List [mailto:[login to unmask email] On Behalf
Of Squeak Smalltalk
Sent: Friday, December 23, 2005 3:40 AM
To: [login to unmask email]
Subject: [DB2-L] Restore to new server.

Hi,

I need to restore a online back to a new server.
I have
1- the logfile
2- the online backup.
Do I need something more ?

The plan was
a- Install db2 on the machine
b- create the instance
c- create the database with "db2 create database Old_db_name" ( for
the moment I do not have the total create statement for the old db. I
can probably fix it)
d- do the restore. " db2 RESTORE DATABASE Old_db_name FROM . TAKEN AT
'20051221080102' INTO Old_db_name"; "

I have this problem.
SQL2523W Warning! Restoring to an existing database that is
different from the database on the backup image, but have matching
names. The target database will be overwritten by the backup version.
The Roll-forward recovery logs associated with the target database
will be deleted.
Do you want to continue ? (y/n) y
SQL0970N The system attempted to write to a read-only file. SQLSTATE=55009

Any advice ?

B.R
W.

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm