View a markdown version of this page

Backing up and restoring DB clusters with data groups - Amazon Aurora

Backing up and restoring DB clusters with data groups

You back up and restore a DB cluster that has data groups in the same way as any Aurora DB cluster. A restore creates a new DB cluster. You can choose which data groups to include in it.

What backups contain

Backing up a DB cluster with data groups has similarities and differences compared to backing up a standard Aurora DB cluster.

  • Automated backups and manual DB cluster snapshots include every data group in the DB cluster, and the default data group.

  • There's no snapshot or backup policy for one data group. You back up the whole DB cluster.

  • A data group is in a point-in-time restore only if it was on the DB cluster at the time that you restore to. After a data group moves, the backups of the target DB cluster cover it from the time of the move.

  • The describe-db-cluster-snapshots and describe-db-cluster-automated-backups output has a CustomDataGroupPresent field. It shows whether the backup holds data groups that you created.

You create a snapshot of a DB cluster with data groups in the same way as for a standard Aurora DB cluster, as shown in the following AWS CLI example:

aws rds create-db-cluster-snapshot \ --db-cluster-identifier orders-cluster-1 \ --db-cluster-snapshot-identifier orders-cluster-1-snap-1124

For more information on backing up DB clusters, see Overview of backing up and restoring an Aurora DB cluster.

Finding the restore window for a data group

A data group's restore window is the time range in which a point-in-time restore from a DB cluster automated backup is guaranteed to contain it. You can use the AWS Management Console or AWS CLI to find it.

A restore just outside a window might not contain the data group, so choose a time inside the window.

Use the following procedure.

To find a data group's restore window using the console
  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In the navigation pane, choose Data Groups.

  3. Choose the name of the data group.

  4. On the details page, find the Automated backups table. It shows the earliest and latest restorable time for each backup that holds the data group.

Use the describe-data-group-restore-windows AWS CLI command with one of the following:

  • --data-group-identifier – The identifier or ARN of the data group.

  • --db-cluster-automated-backups-arn and --timestamp – An automated backup and a point in time. The output lists the data groups that you can restore from that backup at that time.

The following example finds the restore windows for tenant42.

aws rds describe-data-group-restore-windows \ --data-group-identifier dg-a1b2c3d4-5678-90ab-cdef-EXAMPLE11111

The output resembles the following example. The data group moved from orders-cluster-1 to orders-cluster-2, so it has a window in the backups of each.

{ "DataGroupRestoreWindows": [ { "DataGroupIdentifier": "dg-a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "DBClusterAutomatedBackupsArn": "arn:aws:rds:us-east-1:111122223333:cluster-auto-backup:cluster-backup-EXAMPLE1orders1", "KmsKeyId": "arn:aws:kms:us-east-1:111122223333:key/1a2b3c4d-5e6f-7a8b-9c0d-EXAMPLE11111", "StorageEncryptionType": "sse-kms", "RestoreWindow": { "EarliestTime": "2026-11-24T18:03:00Z", "LatestTime": "2026-11-25T09:41:00Z" } }, { "DataGroupIdentifier": "dg-a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "DBClusterAutomatedBackupsArn": "arn:aws:rds:us-east-1:111122223333:cluster-auto-backup:cluster-backup-EXAMPLE2orders2", "KmsKeyId": "arn:aws:kms:us-east-1:111122223333:key/4d5e6f7a-8b9c-0d1e-2f3a-EXAMPLE33333", "StorageEncryptionType": "sse-kms", "RestoreWindow": { "EarliestTime": "2026-11-25T09:40:00Z", "LatestTime": "2026-11-26T12:05:00Z" } } ] }
Note

In this output, the key field is KmsKeyId. In the data group and snapshot data group output, it's KMSKeyId. If you use --query, match the casing of the command you're running.

For more information, see describe-data-group-restore-windows.

Finding the data groups in a snapshot

You can use the AWS Management Console or AWS CLI to list the data groups that a DB cluster snapshot holds, or the snapshots that hold a data group.

Use the following procedure.

To find the snapshots that hold a data group using the console
  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In the navigation pane, choose Data Groups.

  3. Choose the name of the data group.

  4. On the details page, find the Snapshots table.

Use the describe-db-cluster-snapshot-data-groups AWS CLI command with at least one of the following parameters:

  • --db-cluster-snapshot-identifier – Lists the data groups in one snapshot.

  • --data-group-identifier – Lists the snapshots that hold one data group.

The following example lists the data groups in a snapshot.

aws rds describe-db-cluster-snapshot-data-groups \ --db-cluster-snapshot-identifier orders-cluster-1-snap-1124

The output resembles the following example.

{ "DBClusterSnapshotDataGroups": [ { "DBClusterSnapshotIdentifier": "orders-cluster-1-snap-1124", "DBClusterIdentifier": "orders-cluster-1", "DataGroupName": "tenant42", "DataGroupIdentifier": "dg-a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "DBClusterSnapshotCreateTime": "2026-11-24T20:00:12.004Z", "KMSKeyId": "arn:aws:kms:us-east-1:111122223333:key/1a2b3c4d-5e6f-7a8b-9c0d-EXAMPLE11111", "StorageEncryptionType": "sse-kms" }, { "DBClusterSnapshotIdentifier": "orders-cluster-1-snap-1124", "DBClusterIdentifier": "orders-cluster-1", "DataGroupName": "tenant57", "DataGroupIdentifier": "dg-a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "DBClusterSnapshotCreateTime": "2026-11-24T20:00:12.004Z", "KMSKeyId": "arn:aws:kms:us-east-1:111122223333:key/9f8e7d6c-5b4a-3210-fedc-EXAMPLE22222", "StorageEncryptionType": "sse-kms" } ] }

The output names the KMS key that each data group needs, so you can check your key access before you restore.

For more information, see describe-db-cluster-snapshot-data-groups.

Restoring a DB cluster with data groups

You can use the AWS Management Console or AWS CLI to restore a DB cluster from a snapshot or to a point in time. By default, the restore includes every data group. To restore only some, name them in the restore request. You can name up to 100 data groups.

Restoring a DB cluster always restores the default data group.

Use the following procedure.

To restore a DB cluster with chosen data groups using the console
  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. Do one of the following:

    • To restore from a DB cluster snapshot, in the navigation pane, choose Snapshots. Choose the DB cluster snapshot, and then for Actions, choose Restore snapshot.

    • To restore to a point in time, in the navigation pane, choose Automated backups. Choose the DB cluster, and then for Actions, choose Restore to point in time.

  3. On the restore page, select Choose specific data groups to restore, and then choose the data groups that you want. You can choose data groups that are in the snapshot, or that exist at the point in time that you restore to. If you leave the box clear, every data group is restored.

  4. To put a restored data group under a different KMS key, choose the key for it in the restore request.

  5. Choose the rest of the settings as for any Aurora restore, then start the restore.

For the rest of the restore settings, see Restoring from a DB cluster snapshot and Restoring a DB cluster to a specified time.

Use the restore-db-cluster-from-snapshot or restore-db-cluster-to-point-in-time AWS CLI command. To choose data groups, add the following parameter:

  • --data-group-restore-configurations – A list of up to 100 entries, one for each data group to restore. Each entry has the following fields:

    • DataGroupIdentifier – (Required) The identifier of the data group.

    • KmsKeyId – (Optional) A different KMS key for the restored data group.

    • AdditionalEncryptionContext – (Optional) Key-value pairs for the encryption context.

The following example restores a snapshot into a new DB cluster. It includes tenant42 with its own key, and tenant57 with a new key.

aws rds restore-db-cluster-from-snapshot \ --db-cluster-identifier orders-restore-1 \ --snapshot-identifier orders-cluster-1-snap-1124 \ --engine aurora-postgresql \ --data-group-restore-configurations '[ {"DataGroupIdentifier": "dg-a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"}, {"DataGroupIdentifier": "dg-a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "KmsKeyId": "arn:aws:kms:us-east-1:111122223333:key/0a1b2c3d-4e5f-6a7b-8c9d-EXAMPLE44444"} ]'

The following example restores the same two data groups to a point in time.

aws rds restore-db-cluster-to-point-in-time \ --db-cluster-identifier orders-restore-2 \ --source-db-cluster-identifier orders-cluster-1 \ --restore-to-time 2026-11-25T06:00:00Z \ --data-group-restore-configurations '[ {"DataGroupIdentifier": "dg-a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"}, {"DataGroupIdentifier": "dg-a1b2c3d4-5678-90ab-cdef-EXAMPLE22222"} ]'

As with any Aurora restore, the new DB cluster has no DB instances. Add a writer DB instance with create-db-instance.

For more information, see restore-db-cluster-from-snapshot and restore-db-cluster-to-point-in-time.

After the restore, the data groups in the new DB cluster have the following properties:

  • Each one is restoring until you create a writer DB instance on the restored DB cluster. After the writer DB instance is available, the data group becomes active. List them with describe-data-groups --db-cluster-identifier orders-restore-1.

  • The data group name is populated after the writer DB instance comes up successfully on the restored DB cluster.

  • If you don't have the kms:CreateGrant and kms:DescribeKey permissions for a data group being restored, only that data group fails and has the status inaccessible-encryption-credentials. The other data groups, including the default data group, are restored. To restore that data group, grant the permissions and restore again.

  • The restored data groups keep the tags of the source data groups.

After you restore, make sure to check the data by running your queries on the new DB cluster.

Cloning a DB cluster with data groups

You clone a DB cluster that has data groups in the same way as any Aurora DB cluster. The clone is a new DB cluster that includes every data group of the source DB cluster. You can't choose which data groups to include, and you can't specify --data-group-restore-configurations for a clone. To include only some data groups, restore the DB cluster instead. For more information, see Restoring a DB cluster with data groups.

The data groups in the clone have the following properties:

  • Each one has a new data group identifier.

  • A data group with its own KMS key keeps that key and its encryption context. A data group that uses the DB cluster key uses the key of the clone.

Use the AWS Management Console or the AWS CLI restore-db-cluster-to-point-in-time command with --restore-type copy-on-write to clone the DB cluster, as for any Aurora clone. For more information about cloning, see Cloning a volume for an Amazon Aurora DB cluster.

The following AWS CLI command clones orders-cluster-1 with all of its data groups. Replace the following values:

  • orders-cluster-1 – The identifier of the source DB cluster.

  • orders-clone-1 – The identifier for the clone.

aws rds restore-db-cluster-to-point-in-time \ --source-db-cluster-identifier orders-cluster-1 \ --db-cluster-identifier orders-clone-1 \ --restore-type copy-on-write \ --use-latest-restorable-time

When you clone with the AWS CLI, the new DB cluster has no DB instances. Add a writer DB instance with create-db-instance. Then list the data groups in the clone with describe-data-groups --db-cluster-identifier orders-clone-1. When you clone with the AWS Management Console, the clone has one DB instance.

You can't clone a DB cluster with data groups to another AWS account.