Stelo Technical Documents
Backing up the DB2 control database
Last Update: 2024/07/26
Product: SQDR Plus and SQDR
Version: All
Article ID: SQV00PL079
Objective
SQDR Plus and SQDR uses DB2 LUW as a control and staging database for its backend logic. The goal of this document is to provide users guidance on how to backup their control databases to safeguard against corruption and as part of a backup / recovery process before system maintenance, upgrades, migrations, etc.
This document describes using offline backup, which can be performed on databases that are configured for circular logging. See Db2 Archive Logging & Online Backups of Control Databases for information on enabling archive logging and performing online backups.
Table of contents
Considerations
Please refer to the following considerations to ensure a smooth backup and recovery process
- This tech note applies to combined tier installations. For split tier installations, ensure the following:
- ALL Tier 03 (SQDR) services have been stopped before proceeding to backup the DB2 control database(s).
- Download the backup script to ALL Tier 02 (SQDR Plus) servers.
- For environments that are replicating to Data Bricks, ensure that ALL notebooks have been stopped prior to backing up the DB2 control database(s).
- To reduce the size of the backups, users can perform a DB2 REORG which will reclaim disk space by eliminating fragmented data. For more information on how to perform a REORG, please refer to DB2 REORG.
Note: Depending on how many transactions are currently staged in the control databases at the time replication is stopped, that will determine the size of the database backups. - Ensure that there is enough space in the disk where the backups will be created. As an example, if the backups will be created in the C drive, ensure that there is sufficient space in the C drive.
- For users that want to run the script repeatedly but don't want to preserve old backups, download Set backup retention and run the script in a DB2 Command Window as an administrator.
Procedure
The following procedure shows how to back up the control databases through a batch script
- Open "DB2 Command Window - Administrator" as shown below
- Download the controldb-backup.bat onto the C:\Stelo directory
- In the DB2 Command Window, change directories to C:\Stelo as shown in the example
- Run the controldb-backup.bat script. The script will automatically stop the replication services, perform the backup of the DB2 control databases, and then start the replication services
- Verify that the backups have been created
- (Optional) Store the backups in a different location from the Stelo server
- To perform a control database restore, refer to restore a control database from backup for more details.
DISCLAIMER
The information in technical documents comes without any warranty or applicability for a specific purpose. The author(s) or distributor(s) will not accept responsibility for any damage incurred directly or indirectly through use of the information contained in these documents. The instructions may need to be modified to be appropriate for the hardware and software that has been installed and configured within a particular organization. The information in technical documents should be considered only as an example and may include information from various sources, including IBM, Microsoft, and other organizations.