question

DICKSONDikizeyiko-5755 avatar image
0 Votes"
DICKSONDikizeyiko-5755 asked DICKSONDikizeyiko-5755 commented

Restore Azure webapp Slot into another slot via Python SDK

Hello,

I currently have a webapp MyWebApp and two slots named OldDev and NewDev.

I try to restore the slot OldDev in the slot NewDev but I always get a conflict error saying that the slot OldDev already exists. Here is my snippet of code


SNIPPET OF CODE

webapp_client.web_apps.begin_restore_slot(
    resource_group_name="myResourceGroup",
    name="MyWebApp",
    backup_id=100,
    slot="OldDev",
    request={
        "kind": "app,linux",
        "properties": {
            "storageAccountUrl": "storageAccountUrl",
            "overwrite": False,
            "ignoreDatabases": True,
            "ignoreConflictingHostNames": True,
            "siteName": 'MyWebApp/NewDev',
            "operationType": {
                "Relocation": 'MyWebApp/NewDev'
            }
        }
    }
)


Response message


Website with given name MyWebApp(OldDev) already exists.


Do You have any ideas of what's wrong in my code?

Thanks in advance

azure-webapps-backup
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@DICKSONDikizeyiko-5755 The begin_restore_slot() method restores a specific backup to another app or deployment slot. Are you intending to swap slots instead?

0 Votes 0 ·

No I really intented to restore a specific backup to another deployment slot

0 Votes 0 ·

0 Answers