Musings of a VMware Cloud Geek

VMware vSphere Foundation 9.1.0: Backup & Restore Steps

When you deploy VMware vSphere Foundation (VVF) 9.1.0 using the VCF Installer, you deploy an instance of VCF Management Services which gives you lifecycle services and the ability to deploy Log Management in your VVF environment. The ability to configure and perform backup operations is not exposed through the VCF Operations UI in the case of VVF. To setup & take backups you must use the API. Here are some examples of configuring and taking backups.

Configure a Backup (SFTP) location

Retrieve a VCF management services runtime token.

export VCFMS_SR='sfo-sr01.sfo.rainpole.io'
export VCFMS_SR_PASSWORD='*********'
VCFMS_SR_TOKEN=$(curl -ks --request POST \
--url "https://$VCFMS_SR/api/v1/identity/token" \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data grant_type=password \
--data "username=admin@vsp.local" \
--data "password=$VCFMS_SR_PASSWORD" \
| jq -r '.access_token')

Retrieve the SFTP server fingerprint.

SSH fingerprints of type RSA and ED25519 are supported

Enter the full fingerprint in the payload of the next step. Example: SHA256:yA3FHIQMbiMnansI4+lONYBASLP2IQhGZkGJIMZ2Pi8

ssh-keyscan -p 22 <sftp_server_ip> | ssh-keygen -lf -

Configure a Backup (SFTP) location

curl -ks -X POST "https://$VCFMS_SR/api/v1/components/1f5c79fe-e3aa-41b1-a5cf-774a6497fa3d?action=apply" \
-H "Authorization: Bearer $VCFMS_SR_TOKEN" \
-d '{
"spec": {
"configuration": {
"backups": {
"destination": "sftp",
"encryptionPassphrase": "**************",
"storage": {
"sftp": {
"directory": "/media/backups/",
"host": "10.167.173.126",
"port": "22",
"username": "svc-vcf-bck",
"password": "**************",
"fingerprint": "<sftpFingerprint>"
}
}
}
}
},
"options": {
}
}' | jq

Monitor the task until it is successful

curl -k -s -X GET "https://sfo-sr01.sfo.rainpole.io/api/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $VCFMS_SR_TOKEN" \
-H "Accept: application/json"

Create a Backup Schedule

Submit the backup schedule using cron format

TASK_ID=$(curl -k -s -X POST "https://sfo-sr01.sfo.rainpole.io/api/v1/components/1f5c79fe-e3aa-41b1-a5cf-774a6497fa3d?action=apply" \
-H "Authorization: Bearer $VCFMS_SR_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"spec": {
"configuration": {
"backups": {
"full": {
"enable": true,
"schedule": "0 2 * * 0"
},
"incremental": {
"enable": true,
"schedule": "0 2 * * 1-6"
}
}
}
},
"options": {}
}' | grep -o '"id":[^,]*' | grep -o '[^"]*$')
# Print the ID to verify it was captured
echo "Submitted Task ID: $TASK_ID"

Monitor the task until it is successful

curl -k -s -X GET "https://sfo-sr01.sfo.rainpole.io/api/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $VCFMS_SR_TOKEN" \
-H "Accept: application/json"

Perform an On-Demand Backup

Get a fleet LCM session token so you can retrieve a list of component IDs

export VCFMS_FC='flt-fc01.rainpole.io'
export VCFMS_FC_PASSWORD='VMw@re1!VMw@re1!'
VCFMS_FC_TOKEN=$(curl -ks --request POST \
--url "https://$VCFMS_FC/api/v1/identity/token" \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data grant_type=password \
--data "username=admin@vsp.local" \
--data "password=$VCFMS_FC_PASSWORD" \
| jq -r '.access_token')

Retrieve a list of components to be backed up

curl -k -s "https://$VCFMS_FC/fleet-lcm/v1/components" \
-H "Authorization: Bearer $VCFMS_FC_TOKEN" | jq '.components[] |
if .componentTypeDescription == "VCF services runtime"
then {id, componentTypeDescription, fqdn}
else {id, componentTypeDescription}
end'

Retrieve a services runtime token so you can take a backup

export VCFMS_SR='sfo-sr01.sfo.rainpole.io'
export VCFMS_SR_PASSWORD='VMw@re1!VMw@re1!'
VCFMS_SR_TOKEN=$(curl -ks --request POST \
--url "https://$VCFMS_SR/api/v1/identity/token" \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data grant_type=password \
--data "username=admin@vsp.local" \
--data "password=$VCFMS_SR_PASSWORD" \
| jq -r '.access_token')

Take a backup of multiple components

TASK_ID=$(curTASK_ID=$(curl -ks \
-H "Authorization: Bearer ${VCFMS_SR_TOKEN}" \
-H "Content-Type: application/json" \
-X POST \
-d "{\"components\": [\"${COMPONENT_ID1}\", \"${COMPONENT_ID2}\"]}" \
"${VCFMS_SR}/api/v1/system/backups?action=backup" | jq -r '.id') "${COMPONENT_ID2}"]}' "${VCFMS_SR}/api/v1/system/backups?action=backup" | jq)

Monitor the task until it is successful

curl -k -s -X GET "https://sfo-sr01.sfo.rainpole.io/api/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $VCFMS_SR_TOKEN" \
-H "Accept: application/json"

Perform a Restore

Retrieve a VCF management services runtime token.

export VCFMS_SR='sfo-sr01.sfo.rainpole.io'
export VCFMS_SR_PASSWORD='*********'
VCFMS_SR_TOKEN=$(curl -ks --request POST \
--url "https://$VCFMS_SR/api/v1/identity/token" \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data grant_type=password \
--data "username=admin@vsp.local" \
--data "password=$VCFMS_SR_PASSWORD" \
| jq -r '.access_token')

Retrieve a list of backups for fleet lifecycle and log management.

curl -k "https://$VCFMS_SR/api/v1/system/backups" \
-H "Authorization: Bearer $VCFMS_SR_TOKEN" \
-H 'accept: application/json' | \
jq -r '
["vcf-fleet-lcm", "ops-logs"] as $order
| .backups as $all
| $order[] as $current_type
| $all[]
| select(.component.type == $current_type)
| (
(.name | sub("T(?<h>\\d{2})-(?<m>\\d{2})-(?<s>\\d{2})Z"; "T\(.h):\(.m):\(.s)Z") | fromdateiso8601)
) as $timestamp
| ( (now - $timestamp) / 86400 | floor ) as $days_old
| [ $current_type, .component.version, .name, ($days_old | tostring + " days ago"), .path ]
| @tsv' | \
column -t -s $'\t'

Perform the restore

TASK_ID=$(curl -k -X POST "https://$VCFMS_SR/api/v1/system/backups?action=restore" \
-H "Authorization: Bearer $VCFMS_SR_TOKEN" \
-H 'accept: application/json' \
-H "Content-type: application/json" \
-d '{
"components": [
{
"path": "sftp://svc-vcf-bck@10.167.173.126:22/media/backups/vcf/backups/1f5c79fe-e3aa-41b1-a5cf-774a6497fa3d/9.1.0.0.25257932/vcf-fleet-lcm/1f5c79fe-e3aa-41b1-a5cf-774a6497fa3d/9.1.0.0.25257932/2026-03-23T16-45-31Z",
"point": "2026-03-23T16-45-31Z"
},
{
"path": "sftp://svc-vcf-bck@10.167.173.126:22/media/backups/vcf/backups/1f5c79fe-e3aa-41b1-a5cf-774a6497fa3d/9.1.0.0.25257932/ops-logs/3d7c01a5-55fb-4b2a-8f0e-c4d24c6d2c03/9.1.0.0.25262128/2026-03-23T16-54-12Z",
"point": "2026-03-23T16-54-12Z"
}
]
}' | jq -r '.id')

Monitor the task until it is successful

curl -k -s -X GET "https://sfo-sr01.sfo.rainpole.io/api/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $VCFMS_SR_TOKEN" \
-H "Accept: application/json"

2 responses to “VMware vSphere Foundation 9.1.0: Backup & Restore Steps”

  1. VCF 9.1 – Automating VCF Backup Scheduling with the Fleet LCM API

    […] create a backup schedule for VMware vSphere Foundation (VVF), my colleague Brian O’Connell just published an article on using the Fleet LCM API as the process is slightly different from a VCF-based […]

  2. Password, Certificate & Backup Management UI/API for VMware vSphere Foundation (VVF) 9.1 

    […] VCF Operations Fleet Backup/Restore API is used to manage backups for VCFMS (reference example implementation) […]

Leave a comment