Closed mVermaat closed 4 years ago
I noticed something strange.
The Management API Reference states it has a 'CreatedOn' parameter. This would work The Cmdlet API Reference has a InstanceRestorePoint parameter in the documentation, however if i look into the module itself it doesn't have it. It really needs a backup ID. My next check was to get all the backups and match based on DateTime. This didn't really get anywhere, because when I print all the backups. The system backups don't have an ID and only have 1 per 24 hours instead of the 30 minutes available in the admin portal. (see screenshot below)
Anyone have any pointers how to do this?
@mVermaat I can't see how you can achieve this with the current APIs. I couldn't find the restore point in the PS module once loaded in PS ISE.
Regarding input parameter, it would have to be a string that can be parsed into a datetime in UTC preferably. If you want to get complicated you can create a datetime control for this :)
Anyway we need the API for this first. I'll see if I can get more info on how to do this.
Awesome, thanks!
@mVermaat Let me know how it works for you. I tried to keep it backwards compatible. So it retrieves the backup timestamp from label as the new api doesn't support restore using backupid
@WaelHamze I just included your change in my pipeline. It works great!
I want to restore a backup from a specific DateTime (a system backup, not a manual backup). I noticed that the task only allows the use of a Label. I saw the CmdLet from Microsoft does support it.
I was going to make a PR that has the added variable, however I see that Azure DevOps doesn't allow input parameters to be a DateTime. See Schema.
Before spending some time of making this. @WaelHamze, what is your opinion on this?