- Newest
- Most votes
- Most comments
I have repeated the steps you describe in your question for creating a new DB from the point-in-time restore. It seems as though the web site is defaulting to a time that is not yet valid. I have reported this as a defect to our development team.
To work around it, please choose a time that is earlier than the latestRestorableTime
reported by GetRelationalDatabase
for your db instance. If you have the AWS CLI installed you can get that information by using the following command:
aws lightsail get-relational-database --relational-database-name <name of your original database>
It will output something similar to this:
{
"relationalDatabase": {
"name": "foo",
"arn": "REDACTED",
"supportCode": "REDACTED",
"createdAt": "2022-11-03T11:21:09.771000-07:00",
... omitted for brevity.
"latestRestorableTime": "2022-11-03T11:54:30-07:00", <--- This is the latest time you can restore from.
... omitted for brevity.
}
}
You should select the closest time to, but before the time reported there.
If you need more precision you can use the aws cli to restore from the latest restorable time automatically:
aws lightsail create-relational-database-from-snapshot --relational-database-name foo-restore --source-relational-database-name foo --use-latest-restorable-time
Where "foo" is the name of the original database and "foo-restore" is the name of the new database.
If you need to restore from a specific time that is not the latest you can use the --restoreTime
parameter instead of --use-latest-restorable-time
. Please consult the CLI reference for details: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lightsail/create-relational-database-from-snapshot.html
Note that in all example command lines above I have omitted authentication parameters because I have a default profile setup for my account. You can consult the CLI user guide for details on how to authenticate via the CLI: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html
Regarding the second issue you described where you are getting a naming conflict: please be aware that resource names in Lightsail must be regionally unique across all resource types. This means that if you have any resource, not just a database, with that name you will receive the "Some names are already in use" error message.
I hope this helps!
Relevant content
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago