Closed karthik25 closed 4 years ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azureSQLGitHub.
@karthik25 this is by design. For Azure SQL DB, you can restore a database to any point-in-time up to the earliest restore point.
This differs from SQL DataWarehouse where you can only restore to specific, discrete points in time.
@adeal
You mentioned -
For Azure SQL DB, you can restore a database to any point-in-time up to the earliest restore point
In this case I should get both the CONTINUOUS and DISCRETE restore points right? I am saying I am getting only the CONTINUOUS restore point. In other words the API returns only 1 item as opposed to 8 items.
So, if by design I can restore my database to "any" point-in-time, how could I without knowing them all?
Am I missing something?
@karthik25 You should only receive one single CONTINUOUS point which marks the earliest possible time you can restore to. Any time after this point is valid, and it is up to the user which time is used.
In your example above, this is 2020-03-08 00:00 UTC
, which means you can request any point-in-time in [2020-03-08 00:00
, UtcNow - 5 minutes
].
This doc may help explain: What is a Sql Database Backup
I see where we can improve our API reference to explain this more. Thanks for bringing it to our attention.
@adeal Thank you! I guess I am good now. I read this somewhere, but I kind of assumed (incorrectly) that it won't be applicable for every 5 minute interval.
You are welcome (reg. documentation). An update would be really helpful !
I am trying to use the Restore Points - List By Database API (https://docs.microsoft.com/en-us/rest/api/sql/restorepoints/listbydatabase) and it does not seem to be working as expected/documented. It (almost?) always returns only the earliest restore point (CONTINUOUS) not all the available restore points (DISCRETE).
To elaborate a little bit more, one of my databases has the following point-in-time restore points. I got these dates from the azure portal. It displays the earliest and lets us choose a different restore point using a calendar.
But only the first one (2020-03-08 00:00 UTC) is returned by this API.
Am I missing something here? The version of the API is also really old - "2014-04-01". If all that's required is an API version update in the documentation, can you please do that?
The portal can get this obviously, implying either there is a newer version of the API or something special was done for the portal (I am presuming the portal also uses the API's!). If this API is not updated, it greatly reduces our ability to automate things. With 100's of databases in our subscription, having this API working is crucial for us. I really need this API to work for a major implementation I am planning.