Skip to content

Allow using az sql db restore cross-server #20703

@marklagendijk

Description

@marklagendijk

Is your feature request related to a problem? Please describe.
I'm frustrated that I cannot use az sql db restore to restore a PITR backup of my database to a new database on another server.

Describe the solution you'd like
Currently az sql db restore supports the following arguments:

    --dest-name         
    --name -n           
    --resource-group -g                               
    --server -s                    

I would propose adding the following arguments:

    --dest-resource-group
    --dest-server

This way one can restore a PITR backup to another server in another resource group.

Describe alternatives you've considered
Only workarounds like:

  • Using the REST API directly See comment below. Cross-server restore of PITR backups doesn't seem be supported by the REST API.
  • First restoring the database on the same server, and then using an alternative method to get a clone on the target server

Additional context
I expect that az sql db restore uses the REST API, and specifically this endpoint.
As far as I can see there is no limitation that requires using the same server or resource group in the sourceDatabaseId.

The preview command for restoring LTR backups, az sql db ltr-backup restore, does support restoring cross-server.
But since LTR backups are only weekly, this does not suffice for our use-case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    SQLaz sqlService AttentionThis issue is responsible by Azure service team.act-codegen-extensibility-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions