VMware Cloud Community
ekrejci
Enthusiast
Enthusiast
Jump to solution

vAPI com.vmware.appliance.recovery.backup.job.request_job not using correctly parts (common or seat)

Hello,

I'm trying out the backup method from the vAPI to call a vcsa backup and the final backups doesn't backup the "SEAT" event if I specify it in the create task

I chose common or seat doesn't change my final result, it seems that only common data are backup.

the VCSA on which I run the call is a 6.5 and the call is launched from a vRO 7.4

just to add that if I do the call through the rest API using curl it works.

any clue?

many thanks

Eric

Reply
0 Kudos
1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

OK, I think I found what could be the problem. The workflow Backup VCSA (vAPI) (or rather the action com.dutchvblog.actions.InitiateBackup) appears to have a small error.

If you check the documentation for scripting object com_vmware_appliance_recovery_backup_job_backup__request, its attribute parts is specified to be of type Array/string, but the scripting action com.dutchvblog.actions.InitiateBackup passes the list of parts selected in the input parameter as a single string

Note that the above is valid for vCenter 6.7; I don't have a vCenter 6.5 instance at hand to check if the parts attribute in 6.5 is of type string instead of type Array/string as it is in 6.7. If this is the case, then it seems the attribute type has been changed between 6.5 and 6.7. In any case, the attached workflow need to be modified to work properly on 6.7.

View solution in original post

Reply
0 Kudos
4 Replies
iiliev
VMware Employee
VMware Employee
Jump to solution

If possible, could you attach a sample workflow demonstrating the vAPI code that you are using?

Also, could you check if there is something in vRO server log and vAPI endpoint log around the time you perform the backup?

Reply
0 Kudos
ekrejci
Enthusiast
Enthusiast
Jump to solution

Hello,

I took the workflow from the excellent DutchvBlog http://www.dutchvblog.com/virtualization/cloud-automation/backup-vcenter-appliance-vrealize-orchestr...

it is attached.

I see no strange thing in the server log.

for instance there is a workflow that estimate the size of the backup and it clearly can do the difference between the common and seat part of it.

Reply
0 Kudos
iiliev
VMware Employee
VMware Employee
Jump to solution

OK, I think I found what could be the problem. The workflow Backup VCSA (vAPI) (or rather the action com.dutchvblog.actions.InitiateBackup) appears to have a small error.

If you check the documentation for scripting object com_vmware_appliance_recovery_backup_job_backup__request, its attribute parts is specified to be of type Array/string, but the scripting action com.dutchvblog.actions.InitiateBackup passes the list of parts selected in the input parameter as a single string

Note that the above is valid for vCenter 6.7; I don't have a vCenter 6.5 instance at hand to check if the parts attribute in 6.5 is of type string instead of type Array/string as it is in 6.7. If this is the case, then it seems the attribute type has been changed between 6.5 and 6.7. In any case, the attached workflow need to be modified to work properly on 6.7.

Reply
0 Kudos
ekrejci
Enthusiast
Enthusiast
Jump to solution

Thank you very much Ilian,

I missed this one. once the attribute has been change to the array/string it worked just fine.

to be honest, I was thinking about issuing the backup through REST.

what is your opinion about it? is it better to go to REST or vAPI?

many thanks

Eric

Reply
0 Kudos