Why is my Aurora PostgreSQL-Compatible DB instance snapshot taking so long to copy?

Last updated: 2022-12-02

My Amazon Aurora PostgreSQL-Compatible Edition DB instance snapshot is taking a long time to copy. The dashboard shows 100%, but the snapshot export is still in progress.

Short description

Amazon Relational Database Service (Amazon RDS) and Amazon Aurora DB instances can be backed up by using the snapshot method. Snapshot copies involve copying automated backups or manual DB cluster snapshots. When you copy a snapshot, you create a manual snapshot. Snapshot exports involve exporting your DB cluster snapshot data to an Amazon Simple Storage Solution (Amazon S3) bucket.

You can copy snapshot backups across different AWS Regions or within the same Region. You can also make multiple copies by using unique identifiers. Sometime these snapshot copies or exports can take long time.

The time needed for a snapshot copy or export to complete is influenced by a number of factors, including:

  • The size of the volume
  • Whether this is the first snapshot you have taken of the volume (full copy), or an incremental snapshot
  • The number of modified blocks since the previous snapshot
  • Shared network bandwidth
  • Write activity on the volume

Note: A first-time snapshot copy is always a full copy. This generally takes more time to complete. Subsequent copies of the snapshot to the same destination from the same target are incremental. This generally takes less time.

Resolution

Note: If you receive errors when running AWS Command Line Interface (AWS CLI) commands, make sure that you're using the most recent version of the AWS CLI.

Aurora PostgreSQL-Compatible DB instance snapshot is taking a long time to copy

Snapshot copy time also varies depending on number of factors, and can take multiple hours to copy. These factors include:

  • The Regions involved in snapshot copy process
  • The amount of data to be copied
  • The number of snapshot cross-Region requests occurring at the same time from given source Region

Depending on the AWS Regions involved and the amount of data to be copied, a cross-Region snapshot copy can take hours to complete. In some cases, there might be a large number of cross-Region snapshot copy requests from a given source Region. In such cases, Amazon RDS might put new cross-Region copy requests from that source Region into a queue. Amazon RDS does this until some in-progress copies complete. No progress information is displayed about copy requests while they are in the queue. Progress information is displayed only when the copy starts.

The dashboard shows 100% but the snapshot export is still in progress

When you are exporting a snapshot to Amazon S3, you might see that the task is in progress, but shows as 100%. During the export process, the initial data size is estimated, and then continuously corrected during the process. Percentages are calculated based on the extracted data over the estimated data size. So the percentage can show as 100% even when the status is still in progress. To monitor the snapshot progress, use the AWS CLI to run the DescribeExportTask command and including TotalExtractedDataInGB.

Example:

$ aws rds describe-export-tasks --export-task-identifier <TaskIdentifier>

{

    "ExportTasks": [

        {

            "ExportTaskIdentifier": "XXX",

            "SourceArn": "arn:aws:rds:us-east-1:XXXX:snapshot:rds:XXXX-2022-11-06-09-54",

            "SnapshotTime": "2022-11-06T09:55:00.522000+00:00",

            "S3Bucket": "XXXX",

            "S3Prefix": "",

            "IamRoleArn": "arn:aws:iam::XXXX:role/service-role/XXXX",

            "KmsKeyId": "arn:aws:kms:us-east-1:XXXXX:key/XXXXXXX",

            "Status": "STARTING",

            "PercentProgress": 0,

            "TotalExtractedDataInGB": 0  

        }

    ]

}

Did this article help?


Do you need billing or technical support?