Modify the restore period for a temporarily restored Amazon EBS snapshot
When you restore a snapshot temporarily, you must specify the number of days for which
the snapshot is to remain restored in your account. After the restore period expires, the
snapshot is automatically removed from the standard tier.
You can change the restore period for a temporarily restored snapshot at any time.
You can choose to either increase or decrease the restore period, or you can change the
restore type from temporary to permanent.
If you change the restore period, the new restore period is effective from the current
date. For example, if you specify a new restore period of 5
days, the snapshot
will remain restored for five days from the current date.
You can end a temporary restore early by setting the restore period to 1 day.
If you change the restore type from temporary to permanent, the snapshot copy is deleted
from the archive tier, and the snapshot remains available in your account until you manually
re-archive it or delete it.
You can modify the restore period for a snapshot using one of the following methods.
- Console
-
To modify the restore period or restore type
Open the Amazon EC2 console at
https://console.aws.amazon.com/ec2/.
-
In the navigation pane, choose Snapshots.
-
In the list of snapshots, select the snapshot that you previously temporarily
restored, and then choose Actions, Restore snapshot
from archive.
-
For Restore type, do one of the following:
-
To change the restore type from temporary to permanent, select Permanent.
-
To increase or decrease the restore period, keep Temporary, and then for
Temporary restore period, enter the new restore period in days.
-
To confirm, choose Restore snapshot.
- AWS CLI
-
To modify the restore period or change the restore type
Use the
restore-snapshot-tier AWS CLI command. For --snapshot-id
, specify the ID of the
snapshot that you previously temporarily restored. To change the restore type from temporary to
permanent, specify --permanent-restore
and omit --temporary-restore-days
.
To increase or decrease the restore period, omit --permanent-restore
and for
--temporary-restore-days
, specify the new restore period in days.
Example: Increase or decrease the restore period
The following command changes the restore period for snapshot snap-01234567890abcedf
to 10
days.
$
aws ec2 restore-snapshot-tier \
--snapshot-id snap-01234567890abcedf
--temporary-restore-days 10
The following is the command output.
{
"SnapshotId": "snap-01234567890abcedf",
"RestoreDuration": 10,
"IsPermanentRestore": false
}
Example: Change restore type to permanent
The following command changes the restore type for snapshot snap-01234567890abcedf
from temporary to permanent.
$
aws ec2 restore-snapshot-tier \
--snapshot-id snap-01234567890abcedf
--permanent-restore
The following is the command output.
{
"SnapshotId": "snap-01234567890abcedf",
"IsPermanentRestore": true
}