VMware Cloud Community
zenivox
Hot Shot
Hot Shot
Jump to solution

Backup-VCSA.psm1 to automatically backup the PSC

Hello, I'm using the Backup-VCSA.psm1 to automatically backup our VCSAs but we have separated PSCs. I tried to use the same module to do the same the PSCs by:

connect-viserver -server vcsa-address

connect-cisserver -server psc-address

Considering that the Backup-VCSAToFile calls the API below:

$BackupAPI = Get-CisService com.vmware.appliance.recovery.backup.job

I thought that the PSC appliance has the same and could be used, but when the function Backup-VCSAToFile is invoked I get following error:

A server error occurred: 'com.vmware.vapi.std.errors.error': Part 'seat' is not a supported part. (Server error id: 'com.vmware.applmgmt.err_part_not_supported'). Check

$Error[0].Exception.ServerError for more details.

At C:\Scripts\Pro\VCSA-Backup\Backup-VCSA.psm1:72 char:13

+             throw $_.Exception.Message

+             ~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : OperationStopped: (A server error ...r more details.:String) [], RuntimeException

    + FullyQualifiedErrorId : A server error occurred: 'com.vmware.vapi.std.errors.error': Part 'seat' is not a supported part. (Server error id: 'com.vmware.applmgmt.err_part_not_supported'). Check 

   $Error[0].Exception.ServerError for more details.

I thought too good to be true Smiley Happy  Is there any chance to use the same function to backup also the PSC? Or shall I go for a linux script + cron? Many thanks indeed!

Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Can you try changing line 59 in Backup-VCSA.psm1 (and don't forget to do an Import-Module with the Force switch) from

if ($FullBackup) {$parts = @("common","seat")}

into

if ($FullBackup) {$parts = @("common")}

But I'm not sure if that is even supported.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Reply
0 Kudos
4 Replies
LucD
Leadership
Leadership
Jump to solution

Can you try changing line 59 in Backup-VCSA.psm1 (and don't forget to do an Import-Module with the Force switch) from

if ($FullBackup) {$parts = @("common","seat")}

into

if ($FullBackup) {$parts = @("common")}

But I'm not sure if that is even supported.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
zenivox
Hot Shot
Hot Shot
Jump to solution

I just found out that the error is due to the fact that backup for the PSC does not consider full or seat options. It's only one. So if  I remove options like full or seat I get:

Backup-VCSAToFile : Parameter set cannot be resolved using the specified named parameters.

At line:1 char:1

+ Backup-VCSAToFile -LocationType $LocationType -Location $location -Lo ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidArgument: (:) [Backup-VCSAToFile], ParameterBindingException

    + FullyQualifiedErrorId : AmbiguousParameterSet,Backup-VCSAToFile

but the location is ok, tested and retested

Reply
0 Kudos
zenivox
Hot Shot
Hot Shot
Jump to solution

Thanks Luc, we were writing at the same time. Let me try that

Reply
0 Kudos
zenivox
Hot Shot
Hot Shot
Jump to solution

simply Great! Thanks as usual!

Reply
0 Kudos