先说冷备 首先要db2 force applications all干掉所有的链接
干不掉的话把端口号给改了 db2 update dbm cfg using SVCENAME xxxxx 然后等备份完再改回来
没有链接之后就可以离线备份了
db2 backup db dbname to /home/db
2inst1/db
2inst1/backup/ 直接备就行
接着是还原
不需要日志前滚的话这样就行
db2 restore db dbname from /home
2inst1
2inst1/backup taken at 20150908075627 into targetdbname without rolling forward
要前滚的话要把日志拷贝过来单独roll forward到日志的最后
cp archivelog/NODE0000/* log/
rollforward db dbname to end of logs and complete overflow log path (/home/db2inst1/log)