I would like to know which commands on db2
are necesary to make an online & offline backup in order to don´t affect the applications which uses the db2 in real time.
In netbackup terms there are a script which
do the backup, this script is
"db2 backup database sample $MY_SCHED load $MY_LIB open 4 sessions buffer 1024"
where my lib= nbdb2.sl (for 32-bits db2)
but there are not any command to put the database on backup mode, like logretain on, or user exit, so I don´t know which sequence use for each case (online and off line) in addition to the netbackup script.
I appreciate your help and suggestion for this
You would need to turn log retain on and setup a userexit to do online backups.
db2 udpate db cfg for <instance> using LOGRETAIN yes;
db2 udpate db cfg for <instance> USEREXIT on;
Then you'll need to run an offline backup. Nothing can be accessing or connect to the db during this time. If time is a factor, run your offline to /db2/null and then run an online to whatever device you normally back up too.
you then could backup your db with
db2 backup database <instance> online use adsm open 2 sessions 4 buffers parallelism 2
db2 backup database <instance> online to < your device>
Your backup can and probably cause a litlle system slow down.
rember, you cannot have anything connected to the DB during the offline backup.