A database can become unusable due to a wide variety of hardware or software
failures. Ensuring that you have a recent, full backup of your database is an integral part of
planning and implementing a disaster recovery strategy for your system.
Use automatic
database backup as part of your disaster recovery strategy to enable Db2® to back up your
database both properly and regularly.
About this task
You can configure automatic backup
using the command line interface, or
the AUTOMAINT_SET_POLICY system stored procedure. You also need to
enable the health indicator db.db_backup_req, which by default is
enabled. Note that only an active database is considered for the evaluation.
Procedure
-
Set the following database configuration parameters to ON:
- AUTO_MAINT
- AUTO_DB_BACKUP
- To configure automatic backup
usingIBM® Data
Studio,
right-click the database and select the task assistant to configure
automatic backup.
- To configure automatic backup using the AUTOMAINT_SET_POLICY
system stored procedure:
- Configure the automatic backup policy:
- Configure the automatic maintenance policy:
- maintenance type: MAINTENANCE_WINDOW
- configuration XML input: either a BLOB containing your configuration XML input
text; or the name of the file containing your configuration XML input.
- Reactivate the database:
- db2 deactivate db <dbname>
- db2 activate db <dbname>