IBM Books

Administration Getting Started


Step 5. Backing Up a Database for the First Time

Now that you have created a database and tables, and moved data into the tables, you should do an initial backup of the database.

  1. From the Control Center, click mouse button 2 on the database you want to back up. From the pop-up menu, select Backup -> Database using SmartGuide. The Backup Database SmartGuide opens.

    Figure 20. Backup Database SmartGuide


    * Figure SQLK0BDS not displayed.

    The SmartGuide asks you a series of questions and then recommends settings and schedules the backups. It focuses on basic options. If you want to investigate more elaborate procedures, click with mouse button 2 on a database in the Control Center and select Backup.

    Select the Next push button to proceed.

  2. When must your system be available?

    Select the option that best represents when your database needs to be back up and running. This influences how often your database will be backed up and what type of backup will be used.

  3. What level of recovery protection do you need DB2 to provide?

    Choose Complete recovery (Archive Logging) so that all logs up to the last complete transaction can be replayed. Archive logging sets the LOGRETAIN parameter to Yes. You need to complete a full off-line backup after setting on log archiving. An off-line backup is a backup of a database that is made when the database is not being accessed by applications. An on-line backup is a backup of a database that is made while the database is being accessed by other applications.

    We recommend that you do not make any changes to your database until you have set up archive logging. Setting the LOGRETAIN parameter to Yes allows for active and archived logs to be kept and results in the ability for the database to have roll-forward recovery.

    See Chapter 5. "More About Protecting the Data" for more detail on backup and restore. DB2 logs are described in "About the Logs that DB2 Keeps".

  4. What percentage of your data is new or changes each day?

    Use the slider to represent how much of the data in your database is new or changes each day. This influences how often the database should be backed up. You can override the suggested value.

  5. Confirm the type of recovery plan you want to use. The options will summarize the database recovery plan. Each recommendation comes from the choices you made on the previous panels. You can override the recommendations or change your earlier choices.

  6. Select the Change push button to open the Scheduler to customize the backup.

  7. Specify where to store your database backup files. The SmartGuide supports disk on OS/2 operating systems and UNIX-based systems, and disk and tape on Windows NT and Windows 95 operating systems. If you use the Backup window instead of the SmartGuide, you can also back up data using ADSTAR Distributed Storage Manager (ADSM), a user exit, or a vendor-supplied backup utility (DLL) on Intel platforms. See the Administration Guide for more information. For added safety, you may want to store copies of the files at a different location (off-site storage).

  8. Click on Done.

After completing the SmartGuide, and based on your responses to the questions asked, your database could be backed up:

Viewing the Recovery History File

The recovery history file helps you locate information once you have performed a backup. For example, it helps you determine the location of a backup, or in which backup a DB2 object can be found. If a backup is moved to different media, say from disk to tape, this file can be updated to keep track of the new location of the backup.

To view the contents of the recovery history file:

  1. Click on the Journal icon from the toolbar in the Control Center. The Journal window opens.

  2. Select the Recovery page.

Every DB2 backup made contains a copy of this file, and it can be restored from any backup. If you choose to restore it, use caution to avoid overwriting the database's existing history file. Although the recovery history file is an ASCII file, manually editing the file should be done only at your own risk and is not recommended.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]