One-time migration from Linux to Linux environments - Amazon Relational Database Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

One-time migration from Linux to Linux environments

With this migration approach, you back up your self-managed Db2 database to an Amazon S3 bucket. Then, you use Amazon RDS stored procedures to restore your Db2 database to an Amazon RDS for Db2 DB instance. For more information about using Amazon S3, see Integrating an Amazon RDS for Db2 DB instance with Amazon S3.

Limitations and recommendations for using native restore

The following limitations and recommendations apply to using native restore:

  • Amazon RDS only supports offline and online backups for native restore. Amazon RDS doesn't support incremental or Delta backups.

  • You can't restore from an Amazon S3 bucket in an Amazon Web Services Region that is different from the Region where your RDS for Db2 DB instance is located.

  • You can't restore a database if your RDS for Db2 DB instance already contains a database.

  • Amazon S3 limits the size of files that are uploaded to an Amazon S3 bucket to 5 TB. If your database backup file exceeds 5 TB, then split the backup file into smaller files.

  • Amazon RDS doesn't support non-fenced external routines, incremental restores, or Delta restores.

  • You can't restore from an encrypted source database, but you can restore to an encrypted Amazon RDS DB instance.

When you restore your database, the backup is copied and then extracted on your RDS for Db2 DB instance. We recommend that you provision storage space for your RDS for Db2 DB instance that is equal to or greater than the sum of the backup size plus the original database's size on disk.

The maximum size of the restored database is the maximum database size that is supported minus the size of the backup. For example, if the maximum database size that is supported is 64 TiB and the size of the backup is 30 TiB, then the maximum size of the restored database is 34 TiB.

64 TiB - 30 TiB = 34 TiB

Setting up for native backup and restore

For native backup and restore, you need the following Amazon components:

  • An Amazon S3 bucket to store your backup files: Upload any backup files that you want to migrate to Amazon RDS. We recommend that you use offline backups for migrations that can handle downtime. If you already have an S3 bucket, you can use that bucket. If you don't have an S3 bucket, see Creating a bucket in the Amazon S3 User Guide.

    Note

    If your database is large and would take a long time to transfer to an S3 bucket, you can order an Amazon Snow Family device and ask Amazon to perform the backup. After you copy your files to the device and return it to the Snow Family team, the team transfers your backed-up images to your S3 bucket. For more information, see the Amazon Snow Family documentation.

  • An IAM role to access the S3 bucket: If you already have an IAM role, you can use that role. If you don't have a role, see Step 2: Create an IAM role and attach your IAM policy.

  • An IAM policy with trust relationships and permissions attached to your IAM role:For more information, see Step 1: Create an IAM policy.

  • The IAM role added to your RDS for Db2 DB instance: For more information, see Step 3: Add your IAM role to your RDS for Db2 DB instance.

Restoring your Db2 database

After you set up for native backup and restore, you are ready to restore your Db2 database to your RDS for Db2 DB instance.

To restore your Db2 database to your RDS for Db2 DB instance
  1. Connect to your RDS for Db2 DB instance. For more information, see Connecting to your Amazon RDS for Db2 DB instance.

  2. (Optional) To make sure your database is configured with the optimal settings for the restore operation, you can call rdsadmin.show_configuration to check the values for RESTORE_DATABASE_PARALLELISM and RESTORE_DATABASE_NUM_BUFFERS. Call rdsadmin.set_configuration to change these values, as needed. Explicitly setting these values can improve the performance when restoring databases with large volumes of data.

  3. Restore your database by calling rdsadmin.restore_database. For more information, see rdsadmin.restore_database.