讨鬼传2哪个武器好用:DB2 LUW DBA HowTo / A NetBackup for DB2 Cheat...

来源:百度文库 编辑:九乡新闻网 时间:2024/07/04 18:58:10

Useful NetBackup Commands

The NetBackup command-line utilities bprestore and bplist can only be used to retrieve individual logs if the USEREXIT (a deprecated syntax) method of setting up NetBackup for DB2 is used. [This isn’t clearly indicated in docs; I discovered this through a long troubleshooting session with Symantec.]

bprestore can be used to save a database image from tape to disk without actually fully restoring a database. You can retrieve image names for March 24, 2009 for example via something like:

$ /usr/openv/netbackup/bin/bplist -C p1db2dbvip -t 18 -l -R / | grep 20090324
-rw-rw---- db2 db2 26214420K Mar 24 04:33 /DB2/MYDB/node0000/20090324020029/MYDB.0.db2.node0000.30574.20090324020029.4
-rw-rw---- db2 db2 26042372K Mar 24 04:33 /DB2/MYDB/node0000/20090324020029/MYDB.0.db2.node0000.30574.20090324020029.3
-rw-rw---- db2 db2 25157636K Mar 24 04:33 /DB2/MYDB/node0000/20090324020029/MYDB.0.db2.node0000.30574.20090324020029.2
-rw-rw---- db2 db2 26824708K Mar 24 04:33 /DB2/MYDB/node0000/20090324020029/MYDB.0.db2.node0000.30574.20090324020029.1

If there are no backups of any kind on a client, bplist will give you the error:

EXIT STATUS 227: no entity was found

Look up Symantec docs to understand how to use bprestore to restore a file to disk. Remember that if you are using the VENDOR log archival method, you cannot use bprestore to access individual logs. The logs will need to be included in the backup image if you intend to restore a database with rollforward from a bprestore retrieval.