I'm restoring a snapshot of my Amazon Redshift cluster and I want to monitor the progress of the restore.
Short description
Amazon Redshift supports three types of snapshot restore operations:
-
Cluster restore: A cluster restore restores all tables, databases, and metadata from the snapshot. The snapshot is restored to an Amazon Redshift cluster of the same size and node configuration as the source cluster
-
Cross-instance restore: A cross-instance restore restores an Amazon Redshift snapshot to a cluster that's a different size or is running a different node type. A cross-instance restore is performed the same way as a cluster restore. To list all the possible node types and number of nodes for a cluster, run the following query:
aws redshift describe-node-configuration-options --snapshot-identifier <snapshot-identifier> --region <region> --action-type restore-cluster
-
Table restore: A table restore restores specific tables and associated metadata from the snapshot to the Amazon Redshift cluster. For information on how to check on the status of your table restore, see Monitoring a table restore.
Important: New clusters that are created from a snapshot inherit the same security privileges and settings as the source cluster. After the snapshot is restored, any changes that are made to the source cluster don't transfer over to the new Amazon Redshift cluster. Additionally, data can't be merged between the source cluster and newly created Amazon Redshift cluster. The same limitation applies to source tables and newly created tables in Amazon Redshift.
Resolution
Monitoring a cluster restore or cross-instance restore
Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshoot AWS CLI errors. Also, make sure that you're using the most recent AWS CLI version.
Use the AWS Management Console, Amazon Redshift Events, or AWS CLI to monitor the progress of your cluster restore or cross-instance restore.
AWS Management Console
View your Amazon Redshift cluster details in the Amazon Redshift console. When your Amazon Redshift cluster restore is in progress, the cluster status is set to Modifying. On the Clusters details page, choose the Maintenance and monitoring tab. The Maintenance and monitoring tab lists the events that confirm the creation of your Amazon Redshift cluster and completion of any data transfers. After the cluster or cross-over instance restore operation completes, the cluster status is set to Available.
Amazon Redshift Events
To check the status of a cluster restore, review the following events:
- RESTORE_STARTED - REDSHIFT-EVENT-2008: This event is sent when the restore process begins.
- RESTORE_SUCCEEDED - REDSHIFT-EVENT-3003: This event is sent when the new cluster is created and the cluster is available for queries.
- DATA_TRANSFER_COMPLETED - REDSHIFT-EVENT-3537: This event is sent when the data transfer complete.
Note: RA3 clusters emit only RESTORE_STARTED and RESTORE_SUCCEEDED events. Because RA3 node types store data in Amazon Redshift managed storage, there's no data transfer needed after a RESTORE succeeds.
AWS CLI
Use the DescribeClusters API to track the progress of your cluster snapshot. The DescribeClusters API includes snapshot details such as the size, transfer rate, time elapsed, and estimated remaining time in the snapshot restore. Then, check the RestoreStatus entry to see if your snapshot is restored. For more information about snapshot metrics, see RestoreStatus.
To check the status of your snapshot restore, run the following command:
aws redshift describe-clusters --cluster-identifier <value>
For more information, see Restoring a cluster from a snapshot.
Monitoring a table restore
To monitor the progress of your table restore, use either the AWS Management Console or the AWS CLI.
AWS Management Console
After you initiate the table restore, use the Amazon Redshift console to track the status of the request. The Backup tab on the Clusters details page lists any restore table requests. The Status tab shows the current state of the request as SUCCEEDED, FAILED, CANCELED, PENDING, or IN_PROGRESS.
AWS CLI
To use the AWS CLI to monitor a table restore, use the describe-table-restore-status command. The describe-table-restore-status command lists the status of one or more table restore requests made using the RestoreTableFromClusterSnapshot API. If you don't specify a value for the TableRestoreRequestId parameter, then the DescribeTableRestoreStatus API returns the status of all table restore requests. The requests are listed in ascending order by date and time.
To find the status of your table restore, run the following commands:
aws redshift describe-table-restore-status --cluster-identifier <mycluster>
aws redshift describe-table-restore-status --table-restore-request-id <value>
Related information
restore-from-cluster-snapshot