IBM Cloud Docs
Copy Database

Copy Database

The IBM® Db2® on Cloud Copy Database feature gives you the ability to copy your existing database to a new instance or easily change plans and instance types.

The following examples are helpful use cases for using a copy of a database:

  • Run analytics or reports.
  • Make a fresh copy of your production database each morning to use for development purposes.
  • Make a template database for an app, and make a copy of that template as your apps need it.
  • Move from a single node instance to a HA instance or vice versa.
  • Move between Standard or Enterprise Plans.

Because the copy instance creates a new instance and restores your existing backup, it’s important to keep the following in mind:

  • The new instance will have the same amount of resources as the instance it was copied from.
  • Create a full backup of the data you want restored onto the copy
  • Any data written after the backup will not be moved across.
  • When moving between plans or instance types, an outage will be required to point your apps to the new hostname and port.

Prerequisites

The Copy Database feature in the Db2 on Cloud service copies a database from one service instance to a new service instance. To use this feature, a backup of the current database must exist.

Copying a running instance

Select a backup

To copy your instance to a new service instance:

  1. Select Administration from the left menu.
  2. Select the Backups tab.
  3. Select a backup to copy to a new instance.
  4. Click Clone.

Select a backup to Copy
Figure 1. Select a backup to copy to a new instance

Creating the copy instance

Enter information for the new copy instance:

  1. Select the data center location for the new copy instance under Datacenter location.
  2. Enter a name under Service name.
  3. Select the resource group of the new instance under Resource group.
  4. If you'd like a highly available instance, select Yes for High availability configuration. Verify that the other options are correct.
  5. Select a KMS instance to use for the new copy instance under KMS instance. If not selected, a default Key Protect instance and key will be used.
  6. Select the backup location for the new copy instance under Backup Location. If the selected data center location does not support Backup Location, the backup location cannot be changed.
  7. Select a Pricing plan.
  8. Click Clone.

Create the new copy
Figure 2. Create a new copy instance

Progress

The Notifications icon of the console shows the progress of the copy process.

Copy progress
Figure 3. Copy progress

Copy completion

After successful completion of the copy process, the Notifications icon displays a success message.

Copy successfully completed
Figure 4. Copy successfully completed