On Thursday, September 29, 2016 at 12:26:34 PM UTC+5:30,
[email protected] wrote:
Prod db (source db2) : hosted on linux 6.X : installation : /home/db2inst1 Dev db (target db2) : hosted on linux 6.X : installation :/home/db2/db2inst1
Our requirement is to perform an alternate db2 restore from Sourcedb2 (/home/db2inst1) to target db2 (/home/db2/db2inst1).
Is such a restore supported by db2 as we are seeing following error?
SQL1277W A redirected restore operation is being performed. During a table space restore, only table spaces being restored can have their paths reconfigured. During a database restore, storage group storage paths and DMS table space containers can be reconfigured.
DB20000I The RESTORE DATABASE command completed successfully.
[db2inst1@XXX scripts]$ db2 restore db sample continue
SQL1051N The path "/home/db2inst1" does not exist or is not valid. SQLSTATE=57019
Thanks
Aarti
Hi All
We have used a command to generate the script and then updated the "ON" param with destination directory path
db2 "restore db sample from /tmp/sample_Local/backup taken at 20160930022308 into test redirect generate script test.txt
and then re-run a command
db2 -tvf test.txt
Things to keep in mind are:
1. ensure the backup has been taken with the - permission = any
2. ensure the destination folder has permissions as that of the db2inst1 example:
ls -lrt /tmp/destination_restore/
total 4
drwxrwxr-x 3 db2inst1 db2iadm1 4096 Oct 3 13:33 db2inst1
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)