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

New-AzureStorSimpleDeviceBackupScheduleAddConfig

创建备份计划配置对象。

注意

本文档中引用的 cmdlet 用于管理使用 Azure Service Manager (ASM) API 的旧式 Azure 资源。 创建新资源时,建议不要使用旧的 PowerShell 模块,因为计划将停用 ASM。 有关详细信息,请参阅 Azure Service Manager 停用

Az PowerShell 模块是建议用于管理 PowerShell 的 Azure 资源管理器 (ARM) 资源的 PowerShell 模块。

语法

New-AzureStorSimpleDeviceBackupScheduleAddConfig
   -BackupType <String>
   -RecurrenceType <String>
   -RecurrenceValue <Int32>
   -RetentionCount <Int64>
   [-StartFromDateTime <String>]
   -Enabled <Boolean>
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]

说明

New-AzureStorSimpleDeviceBackupScheduleAddConfig cmdlet 创建 BackupScheduleBase 配置对象。 使用此配置对象通过 New-AzureStorSimpleDeviceBackupPolicy cmdlet 创建新的备份策略。

示例

示例 1:创建备份配置对象

PS C:\>New-AzureStorSimpleDeviceBackupScheduleAddConfig -BackupType CloudSnapshot -RecurrenceType Daily -RecurrenceValue 1 -RetentionCount 100 -Enabled $True
VERBOSE: ClientRequestId: 426a79ee-fed3-4d3d-9123-e371f83222b3_PS


BackupType     : CloudSnapshot
Recurrence     : Microsoft.WindowsAzure.Management.StorSimple.Models.ScheduleRecurrence
RetentionCount : 100
StartTime      : 2014-12-16T00:37:19+05:30
Status         : Enabled

此命令为云快照备份创建备份计划基对象。 备份每天都发生,备份将保留 100 天。 此计划从默认时间启用,即当前时间。

参数

-BackupType

指定备份文件类型。 有效值为:LocalSnapshot 和 CloudSnapshot。

类型:String
Position:Named
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-Enabled

指示是否启用备份计划。

类型:Boolean
Position:Named
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-Profile

指定 Azure 配置文件。

类型:AzureSMProfile
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-RecurrenceType

指定此备份计划的重复周期类型。 有效值为:

  • 分钟数
  • 每小时
  • 每日
  • 每周
类型:String
Position:Named
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-RecurrenceValue

指定备份的频率。 此参数使用 RecurrenceType 参数指定的单位。

类型:Int32
Position:Named
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-RetentionCount

指定要保留备份的天数。

类型:Int64
Position:Named
默认值:None
必需:True
接受管道输入:False
接受通配符:False

-StartFromDateTime

指定开始备份的日期。 默认值为当前时间。

类型:String
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

输入

None

输出

BackupScheduleBase

此 cmdlet 返回 BackupScheduleBase 对象。 使用 BackupScheduleBase 构造新的备份策略。