DB2 Image Restoration of PAIS/TCGA
Restoration of a single or individual node
To backup DB2 database (maintenance purpose), use the following:
- Ensure you have enough disk space to store the image.
- Execute:
db2 BACKUP DATABASE TCGA TO '/data/backup'
- Check
db2dump
logs for any potential error.
To rebuild the database from a backup image or to restore DB2 database (to an existing or new node), use the following:
- Assume the TCGA or PAIS database image is stored at
/data/backup
and the new location for the database is at/data/database/tcga
. - Ensure DB2 version is the same or later than the database version used in the image (including the fix pack).
- Ensure there is enough temporary space in the member directory space. The original data path of the database was at
/opt2/databases
. Create symbolic links to larger space if necessary. - Ensure you have all users created as described in Create DB2 groups and users guide. In our case, you need
db2inst1
,db2inst2
,db2fenc1
anddasusr1
for the image of TCGA; only userdb2inst2
has the permission to access of table space. - Execute the following command to restore the database (this process will take a significant amount of time) using user
db2inst1
:db2 RESTORE DATABASE TCGA FROM '/data/backup' TAKEN AT 20140930101430 TO '/data/database/tcga' INTO TCGA NEWLOGPATH '/data/database/log/tcga'
- Check
db2dump
logs for any potential error. - Note:
- For TCGA database image built from Emory, user
db2inst1
is the owner of the db2 instance that runsdb2start
anddb2stop
as well as other configuration. Userdb2inst2
login information is used to access database contents (for portal and WEB API).