VMware Cloud Community
vicentesloboda
Contributor
Contributor
Jump to solution

Appliance backup failing

Hello

     I am trying to automate VCSA backup using as model this article: Automating File-Based Backups of vCenter Server Appliance - VMware PowerCLI Blog - VMware Blogs

     I am my VCSA is version 6.5 U3 (build 140200092) and I am getting the error when I create the backup job. I granted administrator ru

PS D:\backupappliance> connect-cisserver -server vcenter -User myuser@vsphere.local -password mypassword -force

Name                           User                           Port

----                           ----                           ----

vcenter                        myuser@vsphere.local       443 

PS D:\backupappliance> $backupJobSvc = Get-CisService -Name com.vmware.appliance.recovery.backup.job

PS D:\backupappliance> $backupSpec = $backupJobSvc.Help.create.piece.CreateExample()

WARNING: 'CreateExample' method is deprecated and will be removed in a future release. Use 'Create' method inst

ead.

PS D:\backupappliance> $backupSpec.parts = @("common")

$backupSpec.location_type = "FTP"

$backupSpec.location = "ftpserver.my.domain"

$backupSpec.location_user = "myftpuser"

[VMware.VimAutomation.Cis.Core.Types.V1.Secret]$backupSpec.location_password = "mystrongpassword"

PS D:\backupappliance> $backupJobSvc.create($backupSpec)

A server error occurred: 'com.vmware.vapi.std.errors.unauthorized': Unable to authorize user (Server error

id: 'vapi.security.authorization.invalid'). Check $Error[0].Exception.ServerError for more details.

At line:1 char:1

+ $backupJobSvc.create($backupSpec)

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

    + CategoryInfo          : OperationStopped: (:) [], CisServerException

    + FullyQualifiedErrorId : VMware.VimAutomation.Cis.Core.Types.V1.CisServerException

Does anyone know how to solve this?

Thanks in advance

0 Kudos
1 Solution

Accepted Solutions
vicentesloboda
Contributor
Contributor
Jump to solution

I found the problem.

I assigned to myuser just the role of Administrator. I needed to add it in the Administrators too.

Another problem was in the line $backupSpec.location, the line should be:

$backupSpec.location = "ftp://myftpserver.my.domain/x/destinationfolder"

Thanks for your help.

----------------------------------------------------------------------------------------------------------------------------

Was it helpful? Let us know by completing this short survey here.

View solution in original post

0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

Could it be that 6.5U3 still has the issue documented in KB67483

Can you check in the log?


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

0 Kudos
vicentesloboda
Contributor
Contributor
Jump to solution

I found the problem.

I assigned to myuser just the role of Administrator. I needed to add it in the Administrators too.

Another problem was in the line $backupSpec.location, the line should be:

$backupSpec.location = "ftp://myftpserver.my.domain/x/destinationfolder"

Thanks for your help.

----------------------------------------------------------------------------------------------------------------------------

Was it helpful? Let us know by completing this short survey here.

0 Kudos