I'm trying to make an automated script that restores from the latest LTR backup of an Azure SQL server database.
Using this command:
az sql db restore --dest-name $newdbname --name $dbname--resource-group $resourcegroup --server $servername
In docs there seems to be no way to specify which backup to use except with '--time' but then you have to manually specify the datetime string.
Is there a way to automate this with Azure CLI? I know with PowerShell Az module I can list all backups and select the latest, but I can't use PS is this case.(Docker)