Backup and Restore IBM Lotus Connections DBs Online

There are many ways to backup your DB2 environment (Offline/Online; Incremental/Delta;Transaction Log backups). I just needed a suitable way to daily backup my Lotus Connections DBs.

I decided to do an Online Backup (no downtime of DBs/Connections) to a local folder and the folder will be backuped by Symantec Backup Exec.

Following steps have to be done to Backup data:

  1. Update DBs configuration to be ready for Online backups and to store only the latest backup in backup folder. Open a DB2 command window and issue following commands:
    db2 update database configuration for BLOGS using LOGARCHMETH1 LOGRETAIN AUTO_DEL_REC_OBJ ON num_db_backups 1 rec_his_retentn 0
    db2 update database configuration for DOGEAR using LOGARCHMETH1 LOGRETAIN AUTO_DEL_REC_OBJ ON num_db_backups 1 rec_his_retentn 0
    db2 update database configuration for FILES using LOGARCHMETH1 LOGRETAIN AUTO_DEL_REC_OBJ ON num_db_backups 1 rec_his_retentn 0
    db2 update database configuration for FORUM using LOGARCHMETH1 LOGRETAIN AUTO_DEL_REC_OBJ ON num_db_backups 1 rec_his_retentn 0
    db2 update database configuration for HOMEPAGE using LOGARCHMETH1 LOGRETAIN AUTO_DEL_REC_OBJ ON num_db_backups 1 rec_his_retentn 0
    db2 update database configuration for OPNACT using LOGARCHMETH1 LOGRETAIN AUTO_DEL_REC_OBJ ON num_db_backups 1 rec_his_retentn 0
    db2 update database configuration for PEOPLEDB using LOGARCHMETH1 LOGRETAIN AUTO_DEL_REC_OBJ ON num_db_backups 1 rec_his_retentn 0
    db2 update database configuration for SNCOMM using LOGARCHMETH1 LOGRETAIN AUTO_DEL_REC_OBJ ON num_db_backups 1 rec_his_retentn 0
    db2 update database configuration for WIKIS using LOGARCHMETH1 LOGRETAIN AUTO_DEL_REC_OBJ ON num_db_backups 1 rec_his_retentn 0
  2. To activate these new settings you have to stop and start your db instance:
    db2stop
    db2start

    or use force flag if DB is locked
    db2stop force
    db2start
  3. Now backup your DBs to a folder (i.e. Backup_Online):
    db2 backup database BLOGS to D:\Backup_Online
    db2 backup database DOGEAR to D:\Backup_Online
    db2 backup database FILES to D:\Backup_Online
    db2 backup database FORUM to D:\Backup_Online
    db2 backup database HOMEPAGE to D:\Backup_Online
    db2 backup database OPNACT to D:\Backup_Online
    db2 backup database PEOPLEDB to D:\Backup_Online
    db2 backup database SNCOMM to D:\Backup_Online
    db2 backup database WIKIS to D:\Backup_Online
  4. From now on do regular compressed backups of the DBs and include log files (do not forget to backup the folder with you backup agent):
    db2 backup database BLOGS ONLINE to D:\Backup_Online COMPRESS INCLUDE LOGS
    db2 backup database DOGEAR ONLINE to D:\Backup_Online COMPRESS INCLUDE LOGS
    db2 backup database FILES ONLINE to D:\Backup_Online COMPRESS INCLUDE LOGS
    db2 backup database FORUM ONLINE to D:\Backup_Online COMPRESS INCLUDE LOGS
    db2 backup database HOMEPAGE ONLINE to D:\Backup_Online COMPRESS INCLUDE LOGS
    db2 backup database OPNACT ONLINE to D:\Backup_Online COMPRESS INCLUDE LOGS
    db2 backup database PEOPLEDB ONLINE to D:\Backup_Online COMPRESS INCLUDE LOGS
    db2 backup database SNCOMM ONLINE to D:\Backup_Online COMPRESS INCLUDE LOGS
    db2 backup database WIKIS ONLINE to D:\Backup_Online COMPRESS INCLUDE LOGS

 

To Restore all your Data you first have to recreate all 9 DBs with the Lotus Connections DB Wizard:

  1. Run the DB wizard and recreate all 9 DBs
  2. Run following commands inside a DB2 command window to restore the data:
    db2 restore database BLOGS from D:\Backup_Online REPLACE EXISTING
    db2 restore database DOGEAR from D:\Backup_Online REPLACE EXISTING
    db2 restore database FILES from D:\Backup_Online REPLACE EXISTING
    db2 restore database FORUM from D:\Backup_Online REPLACE EXISTING
    db2 restore database HOMEPAGE from D:\Backup_Online REPLACE EXISTING
    db2 restore database OPNACT from D:\Backup_Online REPLACE EXISTING
    db2 restore database PEOPLEDB from D:\Backup_Online REPLACE EXISTING
    db2 restore database SNCOMM from D:\Backup_Online REPLACE EXISTING
    db2 restore database WIKIS from D:\Backup_Online REPLACE EXISTING
  3. Now you have to extract the archive logs from BLOGS db image. Create a temp folder D:\temp and extract archive logs into that folder:
    db2 restore database BLOGS LOGS from D:\Backup_Online LOGTARGET D:\temp

  4. Now you can apply the transactions which are stored in these log files:
    db2 rollforward database BLOGS to end of logs overflow log path (D:\temp)

  5. Complete the rollforward process, otherwise you will not have access to the DB:
    db2 rollforward database BLOGS complete

  6. Delete all files in D:\temp

  7. Repeat extracting the archive logs, apply logs and completion of rollforward process for DOGEAR:
    db2 restore database DOGEAR LOGS from D:\Backup_Online LOGTARGET D:\temp
    db2 rollforward database DOGEAR to end of logs overflow log path (D:\temp)
    db2 rollforward database DOGEAR complete
  8. Delete all files in D:\temp
  9. Repeat extracting the archive logs, apply logs and completion of rollforward process for FILES:
    db2 restore database FILES LOGS from D:\Backup_Online LOGTARGET D:\temp
    db2 rollforward database FILES to end of logs overflow log path (D:\temp)
    db2 rollforward database FILES complete
  10. Delete all files in D:\temp
  11. Repeat extracting the archive logs, apply logs and completion of rollforward process for FORUM:
    db2 restore database FORUM LOGS from D:\Backup_Online LOGTARGET D:\temp
    db2 rollforward database FORUM to end of logs overflow log path (D:\temp)
    db2 rollforward database FORUM complete
  12. Delete all files in D:\temp
  13. Repeat extracting the archive logs, apply logs and completion of rollforward process for HOMEPAGE:
    db2 restore database HOMEPAGE LOGS from D:\Backup_Online LOGTARGET D:\temp
    db2 rollforward database HOMEPAGE to end of logs overflow log path (D:\temp)
    db2 rollforward database HOMEPAGE complete


  14. Delete all files in D:\temp

  15. Repeat extracting the archive logs, apply logs and completion of rollforward process for OPNACT:
    db2 restore database OPNACT LOGS from D:\Backup_Online LOGTARGET D:\temp
    db2 rollforward database OPNACT to end of logs overflow log path (D:\temp)
    db2 rollforward database OPNACT complete


  16. Delete all files in D:\temp

  17. Repeat extracting the archive logs, apply logs and completion of rollforward process for PEOPLEDB:
    db2 restore database PEOPLEDB LOGS from D:\Backup_Online LOGTARGET D:\temp
    db2 rollforward database PEOPLEDB to end of logs overflow log path (D:\temp)
    db2 rollforward database PEOPLEDB complete


  18. Delete all files in D:\temp

  19. Repeat extracting the archive logs, apply logs and completion of rollforward process for SNCOMM:
    db2 restore database SNCOMM LOGS from D:\Backup_Online LOGTARGET D:\temp
    db2 rollforward database SNCOMM to end of logs overflow log path (D:\temp)
    db2 rollforward database SNCOMM complete


  20. Delete all files in D:\temp

  21. Repeat extracting the archive logs, apply logs and completion of rollforward process for WIKIS:
    db2 restore database WIKIS LOGS from D:\Backup_Online LOGTARGET D:\temp
    db2 rollforward database WIKIS to end of logs overflow log path (D:\temp)
    db2 rollforward database WIKIS complete

That’s it, now you can work with your restored data again. Happy Social Business.

Comments

Steve Dionne
Reply

Perfect! Exactly what I was looking for. Thank you so much for sharing with us. 🙂

Chitra
Reply

Wow..Fantastic explanation Klaus.
I have a small query Klaus,Lets say I have installed connections 3.0.1 in two different machines,in same place.

One environment contains data,and another one is newly installed.

Can I backup data from one machine and restore it in another machine(both having different host name and separate servers).

Both installation are same version(Connections 3.0.1)

Is it possible ? Whether your queries will help me to do this task ?

Thanks
Chitra

Chitra
Reply

Hi Klaus,

Thanks a lot.I will test it and let you the status.

Thanks

Chitra
Reply

So Klaus,You mean that I can backup data through your queries and I should follow the “Migrating data side-by-side” steps to transfer the data.Am I right..?

Also is it mandatory to use “IBM Connections database transfer tool” to transfer data between databases.?

Thanks in Advance
Chitra

Klaus Bild
Reply

No, you don’t need these scripts for the data migration. As described in the Wiki you will transfer the data directly from the original DB to your new DB.

Chitra Thambirajan
Reply

Thank you Klaus.

I have a query on wikis.
How to find the wikis binary data stored directory?
Actually I was looking for a wsadmin command to retrieve the wikis path.
But I did not get.

For instance,
If I want to collect/retrieve all the wikis contents which is created by a particular person(not through application,through backend),I can get the metadata from WIKIS database.But the original data(binary formated),how can I?

C:\IBM\Connections\data\shared\wikis ,for me this path only configured to store the wikis contents.But inside of that,number of folders will be created with the name 0-127.Here we can find the saved content.But through the unique id we can not consider the file content.

Inorder to find the particular person’s wikis,I need to get the path right..

Please Advice
Thanks

Oliver Regelmann
Reply

Is it intended behaviour that with this configuration the transactions logs in the LOGSTREAM folders never get pruned automatically and thus the disk is getting fuller and fuller? I’m having this in at least two separate installations where I followed your instructions.

Klaus Bild
Reply

Instead of using logarchmeth1 with LOGRETAIN point logarchmeth1 to an archive disk i.e. “disk:E:\DB2\ARCHIVE_LOGS” -> after that all not current logs will be moved to this folder and should be deleted in the LOGSTREAM folder

Oliver Regelmann
Reply

OK, thanks. And then I have to prune these old archive logs manually or via another batch file. They are of no use anyway because they’re older than the last full backup.

Leave a Reply

%d bloggers like this: