Merge pull request #453 from MallocArray/master
Resolve issues with Backup-VCSA
This commit is contained in:
@@ -35,11 +35,11 @@ Function Backup-VCSAToFile {
|
||||
-CommonBackup will only backup the config whereas -Fullbackup grabs the historical data as well
|
||||
#>
|
||||
param (
|
||||
[Parameter(ParameterSetName=’FullBackup’)]
|
||||
[Parameter(ParameterSetName='FullBackup')]
|
||||
[switch]$FullBackup,
|
||||
[Parameter(ParameterSetName=’CommonBackup’)]
|
||||
[Parameter(ParameterSetName='CommonBackup')]
|
||||
[switch]$CommonBackup,
|
||||
[ValidateSet('FTPS', 'HTTP', 'SCP', 'HTTPS', 'FTP')]
|
||||
[ValidateSet('FTPS', 'HTTP', 'SCP', 'HTTPS', 'FTP', 'SMB')]
|
||||
$LocationType = "FTP",
|
||||
$Location,
|
||||
$LocationUser,
|
||||
@@ -275,11 +275,11 @@ Function New-VCSASchedule {
|
||||
[Parameter(Mandatory=$true)]$Location,
|
||||
[Parameter(Mandatory=$true)]$LocationUser,
|
||||
[Parameter(Mandatory=$true)][VMware.VimAutomation.Cis.Core.Types.V1.Secret]$LocationPassword,
|
||||
[Parameter(Mandatory=$true)][VMware.VimAutomation.Cis.Core.Types.V1.Secret]$BackupPassword,
|
||||
[Parameter(Mandatory=$false)][VMware.VimAutomation.Cis.Core.Types.V1.Secret]$BackupPassword,
|
||||
[Parameter(Mandatory=$true)][ValidateRange(0,23)]$BackupHour,
|
||||
[Parameter(Mandatory=$true)][ValidateRange(0,59)]$BackupMinute,
|
||||
[Parameter(Mandatory=$true)][ValidateSet('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday')][Array]$BackupDays = $null,
|
||||
[Parameter(Mandatory=$true)][Integer]$MaxCount,
|
||||
[Parameter(Mandatory=$true)][ValidateSet('MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY', 'SATURDAY', 'SUNDAY', IgnoreCase = $False)][Array]$BackupDays = $null,
|
||||
[Parameter(Mandatory=$true)][Int]$MaxCount,
|
||||
[Parameter(Mandatory=$false)]$BackupID = "default",
|
||||
[Parameter(Mandatory=$false)]$CisServer = $global:DefaultCisServers,
|
||||
[Parameter(Mandatory=$false)][switch]$IncludeSeat,
|
||||
@@ -319,9 +319,9 @@ Function New-VCSASchedule {
|
||||
$CreateSpec.recurrence_info.Days = $BackupDays
|
||||
$CreateSpec.retention_info.max_count = $MaxCount
|
||||
if ($IncludeSeat) {
|
||||
$CreateSpec.parts = @("seat")
|
||||
$CreateSpec.parts = @("seat","common")
|
||||
} else {
|
||||
$CreateSpec.parts = @()
|
||||
$CreateSpec.parts = @("common")
|
||||
}
|
||||
$CurrentSchedule = $BackupAPI.list()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user