你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az webapp config backup

管理 Web 应用的备份。

命令

名称 说明 类型 Status
az webapp config backup create

创建 Web 应用的备份。

Core GA
az webapp config backup delete

删除 Web 应用备份。

Core GA
az webapp config backup list

列出 Web 应用的备份。

Core GA
az webapp config backup restore

从备份还原 Web 应用。

Core GA
az webapp config backup show

显示 Web 应用的备份计划。

Core GA
az webapp config backup update

为 Web 应用配置新的备份计划。

Core GA

az webapp config backup create

创建 Web 应用的备份。

az webapp config backup create --container-url
                               --resource-group
                               --webapp-name
                               [--backup-name]
                               [--db-connection-string]
                               [--db-name]
                               [--db-type {LocalMySql, MySql, PostgreSql, SqlAzure}]
                               [--slot]

示例

创建 Web 应用的备份。 (autogenerated)

az webapp config backup create --container-url {container-url} --resource-group MyResourceGroup --webapp-name MyWebapp

必需参数

--container-url

包含 BLOB 存储容器的 SAS 令牌的 URL。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

--webapp-name -n

Web 应用的名称。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--backup-name

备份的名称。 如果未指定,则备份将使用 Web 应用名称和时间戳进行命名。

--db-connection-string

备份中数据库的连接字符串。

属性
Parameter group: Database Arguments
--db-name

备份中数据库的名称。

属性
Parameter group: Database Arguments
--db-type

备份中的数据库类型。

属性
Parameter group: Database Arguments
接受的值: LocalMySql, MySql, PostgreSql, SqlAzure
--slot -s

槽的名称。 如果未指定,则默认为生产槽。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az webapp config backup delete

删除 Web 应用备份。

az webapp config backup delete --backup-id
                               --resource-group
                               --webapp-name
                               [--slot]
                               [--yes]

必需参数

--backup-id

备份的 ID。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

--webapp-name -n

Web 应用的名称。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--slot -s

槽的名称。

--yes -y

不要提示确认。

属性
默认值: False
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az webapp config backup list

列出 Web 应用的备份。

az webapp config backup list --resource-group
                             --webapp-name
                             [--slot]

示例

列出 Web 应用的备份。 (autogenerated)

az webapp config backup list --resource-group MyResourceGroup --webapp-name MyWebapp

必需参数

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

--webapp-name -n

Web 应用的名称。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--slot -s

槽的名称。 如果未指定,则默认为生产槽。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az webapp config backup restore

从备份还原 Web 应用。

az webapp config backup restore --backup-name
                                --container-url
                                --resource-group
                                --webapp-name
                                [--db-connection-string]
                                [--db-name]
                                [--db-type {LocalMySql, MySql, PostgreSql, SqlAzure}]
                                [--ignore-hostname-conflict]
                                [--overwrite]
                                [--slot]
                                [--target-name]

必需参数

--backup-name

要还原的备份的名称。

--container-url

包含 BLOB 存储容器的 SAS 令牌的 URL。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

--webapp-name -n

Web 应用的名称。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--db-connection-string

备份中数据库的连接字符串。

属性
Parameter group: Database Arguments
--db-name

备份中数据库的名称。

属性
Parameter group: Database Arguments
--db-type

备份中的数据库类型。

属性
Parameter group: Database Arguments
接受的值: LocalMySql, MySql, PostgreSql, SqlAzure
--ignore-hostname-conflict

忽略存储在备份中的自定义主机名。

--overwrite

如果未指定 --target-name,则覆盖源 Web 应用。

--slot -s

槽的名称。 如果未指定,则默认为生产槽。

--target-name

要用于还原的 Web 应用的名称。 如果未指定,则默认为创建备份时使用的名称。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az webapp config backup show

显示 Web 应用的备份计划。

az webapp config backup show --resource-group
                             --webapp-name
                             [--slot]

示例

显示 Web 应用的备份计划。 (autogenerated)

az webapp config backup show --resource-group MyResourceGroup --webapp-name MyWebapp

必需参数

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

--webapp-name -n

Web 应用的名称。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--slot -s

槽的名称。 如果未指定,则默认为生产槽。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az webapp config backup update

为 Web 应用配置新的备份计划。

az webapp config backup update --resource-group
                               --webapp-name
                               [--backup-name]
                               [--container-url]
                               [--db-connection-string]
                               [--db-name]
                               [--db-type {LocalMySql, MySql, PostgreSql, SqlAzure}]
                               [--frequency]
                               [--retain-one {false, true}]
                               [--retention]
                               [--slot]

必需参数

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

--webapp-name -n

Web 应用的名称。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--backup-name

备份的名称。 如果未指定,则备份将使用 Web 应用名称和时间戳进行命名。

--container-url

包含 BLOB 存储容器的 SAS 令牌的 URL。

--db-connection-string

备份中数据库的连接字符串。

属性
Parameter group: Database Arguments
--db-name

备份中数据库的名称。

属性
Parameter group: Database Arguments
--db-type

备份中的数据库类型。

属性
Parameter group: Database Arguments
接受的值: LocalMySql, MySql, PostgreSql, SqlAzure
--frequency

备份的频率。 使用后跟 d 或 h 的数字,例如 5d = 5 天,2h = 2 小时。

--retain-one

始终保留一个备份,不管备份有多老。

属性
接受的值: false, true
--retention

在自动删除备份之前保留备份的天数。 设置为 0 以无限期保留。

--slot -s

槽的名称。 如果未指定,则默认为生产槽。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False