Skip to content

Redshift - Cannot restore an unencrypted snapshot to an encrypted Cluster

0

I have classic Redshift dc2.large snapshot unencrypted, but i can not restore it because error. Cannot restore an unencrypted snapshot to an encrypted Cluster

How can i restore snapshot?

asked a year ago466 views
2 Answers
1
Accepted Answer
  1. Create a New Unencrypted Cluster:

    • First, create a new temporary Amazon Redshift cluster with the same configuration (such as node type, region, etc.) as your original cluster. This cluster should be unencrypted.
    • Ensure that the cluster is in the same region as the snapshot you want to restore.
    aws redshift create-cluster \
        --cluster-identifier temp-cluster \
        --node-type dc2.large \
        --master-username masteruser \
        --master-user-password masterpassword \
        --db-name mydb \
        --no-encrypted
  2. Restore the Snapshot to the Unencrypted Cluster:

    • Once the temporary unencrypted cluster is set up, you can restore the unencrypted snapshot to this new cluster.
    aws redshift restore-from-cluster-snapshot \
        --cluster-identifier temp-cluster \
        --snapshot-identifier your-unencrypted-snapshot-id
  3. Create an Encrypted Snapshot:

    • After successfully restoring the snapshot to the temporary unencrypted cluster, you can now create an encrypted snapshot of that cluster.
    aws redshift create-snapshot \
        --snapshot-identifier temp-cluster-encrypted-snapshot \
        --cluster-identifier temp-cluster \
        --encrypted
  4. Create a New Encrypted Cluster from the Encrypted Snapshot:

    • Once you have the encrypted snapshot, create a new encrypted cluster from this snapshot.
    aws redshift restore-from-cluster-snapshot \
        --cluster-identifier new-encrypted-cluster \
        --snapshot-identifier temp-cluster-encrypted-snapshot \
        --encrypted
  5. Delete the Temporary Unencrypted Cluster:

    • After the new encrypted cluster is up and running, you can delete the temporary unencrypted cluster to avoid any additional costs.
    aws redshift delete-cluster \
        --cluster-identifier temp-cluster \
        --skip-final-snapshot
answered a year ago
AWS
EXPERT
reviewed 8 months ago
0

Thank you @Hikaru Nguyen. WORKED. Just a note: I can't restore snapshot to existed cluster (step 1) (my snapshot is Automatically), so i just ignore step 1 and start from 2 -> WORKED.

I think it's so confusing when we just use simple command and able restore while on AWS Redshift Console, if i choose restore it will show error:* Cannot restore an unencrypted snapshot to an encrypted Cluster*. AWS should fix it to keep Encrypted is default based on snapshot.

answered a year ago
AWS
EXPERT
reviewed 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.