Berthou.com

A french developper blog

DB2 backup script on Linux

DB2 Backup Script

After my news about DB2 backup script under Windows, I give you in this small article a solution to do the same thing under Linux.

To Backup a database this IBM/DB2 gives you a graphic interface quite simple to use “Control-Center”, but if you want you include this backup in a batch script you must write a backup script without GUI.

In this new I explain how to write a windows script procedure (.bat or .cmd) to backup your DB2 database.

In this sample I considered that you must close your database before backup ( It’s possible to do this in “ONLINE” mode but it’s more complexe — include log file, rollforward…–) and I use a database SAMPLE (it is his name) for this test .

the goal of this scripts is to :

  • Quiesce database (close)
  • Backup your data
  • UnQuiesce database (open)
  • Zip backup file
  • Clean/Delete old backup rows in DB2 catalogue
  • Delete old backup files

(more…)

  • 5 Comments
  • Filed under: db2
  • DB2 Backup Script

    A database is very usefull but it’s always important to backup very often your data. To do this IBM/DB2 gives you a graphic interface quite simple to use “Control-Center”, but if you want you include this backup in a batch script you must write a backup script without GUI.

    In this new I explain how to write a windows script procedure (.bat or .cmd) to backup your DB2 database.

    In this sample I considered that you must close your database before backup ( It’s possible to do this in “ONLINE” mode but it’s more complexe — include log file, rollforward…–) and I use a database SAMPLE (it is his name) for this test .

    the goal of this scripts is to :

    • Quiesce database (close)
    • Backup your data
    • UnQuiesce database (open)
    • Zip backup file
    • Clean/Delete old backup rows in DB2 catalogue
    • Delete old backup files

    (more…)

  • 5 Comments
  • Filed under: db2
  • 

    Archives



    Recent Comments


    View Berthou Raymond's profile on LinkedIn Add to Technorati Favorites
    Web Developement Blogs - Blog Catalog Blog Directory tlmeb