简体   繁体   English

使用python从外部恢复azure数据库

[英]Restore a azure database from outside using python

Is there any way to restore an azure database by calling from outside.有没有办法通过从外部调用来恢复 azure 数据库。 My database is backed up automatically, I want to use that back up to restore to a new database.我的数据库是自动备份的,我想用那个备份来恢复到一个新的数据库。

That is perfect if I can do this by using Python.如果我可以使用 Python 做到这一点,那就太完美了。

Thanks in advance!提前致谢!

You can use REST API to create a new database from a point-in-time restore of an existent database.您可以使用 REST API 从现有数据库的时间点还原创建新数据库。

Sample request.样品请求。

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/dbpitr?api-version=2017-10-01-preview

Request body.请求体。

{
  "location": "southeastasia",
  "sku": {
    "name": "S0",
    "tier": "Standard"
  },
  "properties": {
    "createMode": "PointInTimeRestore",
    "sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb",
    "restorePointInTime": "2017-07-14T05:35:31.503Z"
  }
}

Here you will find more information: 在这里您会找到更多信息:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 Python 恢复 MySQL 数据库 - How to restore MySQL database using Python 从.bson文件为python恢复数据库 - restore database from .bson file for python 从 Azure 外部访问 Azure Database for MySQL 单一服务器 - Accessing an Azure Database for MySQL Single Server from outside Azure 如何使用 FDB 在 Python 脚本中恢复 Firebird 数据库? - How to restore a Firebird database in a Python script using FDB? 如何在python中还原或更新数据库 - How to restore or update database in python 使用 Z23EEEB4347BDD26BDDFC6B7EE 从 Azure 机器学习服务连接 Azure SQL 数据库时出错 - Error in connecting Azure SQL database from Azure Machine Learning Service using python 从外部访问Azure VM(Windows OS)上托管的python应用程序 - Accessing python application hosted on Azure VM (Windows OS) from outside 在 Python 中使用 SQLAlchemy 连接到 Azure 数据库 - Connecting to an Azure database using SQLAlchemy in Python 列出并恢复软删除的 blob - azure python - list and restore soft deleted blobs - azure python 如何从 Python 中的 Azure Functions 连接到 Azure 托管 MySQL 数据库? - How to connect to Azure Managed MySQL Database from Azure Functions in Python?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM