Deleting and restoring backups
After you delete a backup, the service holds the backup for seven days, during which time you can restore the backup. After the seven-day period, you can no longer restore the backup. For more information about managing backups, see Managing backups.
Delete and restore backups (console)
To delete a backup (console)
Open the AWS CloudHSM console at https://console.aws.amazon.com/cloudhsm/home
. -
To change the AWS Region, use the Region selector in the upper-right corner of the page.
-
In the navigation pane, choose Backups.
-
Choose a backup to delete.
-
To delete the selected backup, choose Actions, Delete.
The Delete backups dialog box appears.
-
Choose Delete.
The state of the backup changes to
PENDING_DELETE
. You can restore a backup that is pending deletion for up to 7 days after you request the deletion.
To restore a backup (console)
Open the AWS CloudHSM console at https://console.aws.amazon.com/cloudhsm/home
. -
To change the AWS Region, use the Region selector in the upper-right corner of the page.
-
In the navigation pane, choose Backups.
-
Choose a backup in the
PENDING_DELETE
state to restore. -
To restore the selected backup, choose Actions, Restore.
Delete and restore backups (AWS CLI)
Check the status of a backup or find its ID by using the describe-backups command from the AWS CLI.
To delete a backup (AWS CLI)
-
At a command prompt, run the delete-backup command, passing the ID of the backup to be deleted.
$
aws cloudhsmv2 delete-backup --backup-id
<backup ID>
{ "Backup": { "CreateTimestamp": 1534461854.64, "ClusterId": "cluster-dygnwhmscg5", "BackupId": "backup-ro5c4er4aac", "BackupState": "PENDING_DELETION", "DeleteTimestamp": 1536339805.522, "HsmType": "hsm1.medium", "Mode": "FIPS" } }
To restore a backup (AWS CLI)
-
To restore a backup, issue the restore-backup command, passing the ID of a backup that is in the
PENDING_DELETION
state.$
aws cloudhsmv2 restore-backup --backup-id
<backup ID>
{ "Backup": { "ClusterId": "cluster-dygnwhmscg5", "CreateTimestamp": 1534461854.64, "BackupState": "READY", "BackupId": "backup-ro5c4er4aac" } }
To list backups (AWS CLI)
-
To see a list of all backups in the
PENDING_DELETION
state, run the describe-backups command and includestates=PENDING_DELETION
as a filter.$
aws cloudhsmv2 describe-backups --filters states=PENDING_DELETION
{ "Backups": [ { "BackupId": "backup-ro5c4er4aac", "BackupState": "PENDING_DELETION", "ClusterId": "cluster-dygnwhmscg5", "CreateTimestamp": 1534461854.64, "DeleteTimestap": 1536339805.522, "HsmType": "hsm2m.medium", "Mode": "NON_FIPS", "NeverExpires": false, "TagList": [] } }
Delete and restore backups (AWS CloudHSM API)
Refer to the following topics to learn how to delete and restore backups by using the API.