IBM Database Patterns provides solutions to easily provision and manage databases on IBM Workload Deployer (IWD) in private cloud. IWD is a cloud management appliance that delivers a pattern-based approach to deploying and managing application environments in the cloud.
From the user's perspective, easily creating database images and cloning existing databases are necessary requirements. As a key feature of IBM Database Patterns, database image management provides the ability to back up and clone database.
Here, authors introduce how to create database images, and create new databases using database images in IBM Database Patterns 184.108.40.206.
Configure IBM Tivoli Storage Manager
IBM Database Patterns requires the IBM Tivoli® Storage Manager (TSM) server to store database images. If there is no available TSM server, database images can not be created in IBM Database Patterns.
To configure a TSM server, go to Cloud > System Plug-ins, open the plug-in list in pattern type IBM Database patterns 1.1, and click tsm(220.127.116.11) plug-in.
Figure 1. Plug-in tsm 18.104.22.168
After the TSM plug-in is shown on the right, click Configure, and input the TSM server information.
Figure 2. TSM connection information configuration
Tivoli Storage Manager connection information:
- TSM Server Address specifies TSM server host name.
- TSM Server TCP/IP Port specifies the TCP/IP port on which the TSM server is listening for inbound requests.
- TSM Server Administrator User specifies the administrator user ID to be used for TSM access.
- TSM Server Administrator Password specifies the password associated with the TSM Server Administrator User attribute.
- Domain for DB2® specifies the policy domain for a DB2 backup.
Click OK to save the TSM server information.
Manually configure TSM connectivity for individual databases
In following scenarios, you must configure the TSM connection information on provisioned databases manually:
- User-provisioned databases without TSM configured. To make TSM connection information take effect on those databases, configure TSM connectivity manually on individual databases.
- User-provisioned databases with TSM connection information and the connection information is changed later. Manually reconfigure TSM connection information on individual databases to reflect the change.
For detailed steps, refer to Reconfiguring a database for IBM Tivoli Storage Manager.
On-demand database image creation
IBM Database Patterns provides an operation named "Create database image" to create database images. In this operation, an online full backup (with transaction log enabled) will be executed, and the backup image will be stored in remote TSM server.
When you select the database and click Manage to open the database service console, there is an operation "Create database image" in the operation list of DB2 role (as shown in Figure 3). Input name and description for the image you want to create, then click Submit to create a full backup image for the current database. If TSM is not configured, the operation will fail.
Figure 3. Create database image
The operation status is listed in the Operation Execution Results box at the bottom. If the operation fails, a brief error message will be shown in the Return Value column.
Figure 4. Operation execution results
Scheduled repeatable database image creation
In IBM Database Patterns, a backup scheduler is provided to automatically backup customers' databases periodically. With the Automatic scheduled database backup operation, users can set the frequency of automatic backups. There are three options: daily (default), weekly, and off. If the frequency is set to off, auto-scheduled backup will be disabled.
The scheduler can automatically invoke an online backup with transaction logs enabled. Images created in this way will use System-created image plus the database name as image name. Considering the storage usage, IBM Database Patterns will keep no more than seven auto-backup images. When the limit is reached and a new image is created, the oldest will be deleted automatically. This approach only applies to images created with the Automatic scheduled database backup operation on-demand backup images will not be impacted.
Figure 5. Automatic scheduled database backup
View the database images
To view the information of database images, you can open the database image list operation and refresh it. All existing database images created by that user will be listed there.
Figure 6. List all database images
From the database image list, you can find image name, description, source database, source database ID, and image creation time.
Create database using database images
Users can clone a database using database image. Click Deploy database from the welcome page, or open Instances > Databases and click New to open a database provision dialog.
Figure 7. Deploy database entrance
In the database provision dialog, select Clone from database image for Source. Select the database image from the list to create the new database. For the new database, all database configurations are copied from the image.
Figure 8. Clone database from image
This article introduces the image management feature in IBM Database Patterns, including creating database images and creating new database using backup image.
Special thanks to Ning Wang, IBM Database Patterns architect, for his review and advice.
- The IBM Redbooks® publication "IBM Workload Deployer" has more information.
- Visit the IBM Workload Deployer 3.1 Infocenter.
- Learn more about IBM Database Patterns.
- The IBM DB2 Database for Linux, UNIX, and Windows Information Center has more information.
- Learn more about Information Management at the developerWorks Information Management zone. Find technical documentation, how-to articles, education, downloads, product information, and more.
- Stay current with developerWorks technical events and webcasts.
- Follow developerWorks on Twitter.
Get products and technologies
- Build your next development project with IBM trial software, available for download directly from developerWorks.
- Now you can use DB2 for free. Download DB2 Express-C, a no-charge version of DB2 Express Edition for the community that offers the same core data features as DB2 Express Edition and provides a solid base to build and deploy applications.
- Participate in the discussion forum.
- Check out the developerWorks blogs and get involved in the developerWorks community.
Dig deeper into Information management on developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Experiment with new directions in software development.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.