Use the Cloud Foundation API to configure a backup schedule for the SDDC Manager VM.

This procedure uses the Cloud Foundation API, which is secured by token-based authentication.

Prerequisites

Procedure

  1. To obtain an access token, run the following command:
    curl 'https://SDDC_MANAGER_IP/v1/tokens' -k -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{"username" : "user_name","password" : "user_password"}'
    
    
    Replace the SDDC Manager IP address, user name, and password with the information for your environment.
    The command returns and access token and a refresh token.
    {"accessToken":"eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI2ZGRmZmU3MC0zZGEwLTQ5NmUtOTQzMC1hOGNkNTQ0YTk2ZGMiLCJpYXQiOjE1ODU3ODE3ODcsInN1YiI6ImFkbWluaXN0cmF0b3JAdnNwaGVyZS5sb2NhbCIsImlzcyI6InZjZi1hdXRoIiwiYXVkIjoic2RkYy1zZXJ2aWNlcyIsIm5iZiI6MTU4NTc4MTc4NywiZXhwIjoxNTg1Nzg1Mzg3LCJ1c2VyIjoiYWRtaW5pc3RyYXRvckB2c3BoZXJlLmxvY2FsIiwibmFtZSI6ImFkbWluaXN0cmF0b3JAdnNwaGVyZS5sb2NhbCIsInNjb3BlIjpbIkJBQ0tVUF9DT05GSUdfUkVBRCIsIkNSRURFTlRJQUxfUkVBRCIsIlVTRVJfV1JJVEUiLCJPVEhFUl9XUklURSIsIkJBQ0tVUF9DT05GSUdfV1JJVEUiLCJPVEhFUl9SRUFEIiwiVVNFUl9SRUFEIiwiQ1JFREVOVElBTF9XUklURSJdfQ.WCpUPRIm5A6X_406HTJF7TbTSa0g91_AQbt7OcBPblM","refreshToken":{"id":"47c07f35-0a89-4df5-a3a3-f31265ebbb7a"}}
  2. Set the backup schedule, for example:
    curl 'https://SDDC_MANAGER_IP/v1/system/backup-configuration' -i -X PATCH -H 'Content-Type: application/json' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI2ZGRmZmU3MC0zZGEwLTQ5NmUtOTQzMC1hOGNkNTQ0YTk2ZGMiLCJpYXQiOjE1ODU3ODE3ODcsInN1YiI6ImFkbWluaXN0cmF0b3JAdnNwaGVyZS5sb2NhbCIsImlzcyI6InZjZi1hdXRoIiwiYXVkIjoic2RkYy1zZXJ2aWNlcyIsIm5iZiI6MTU4NTc4MTc4NywiZXhwIjoxNTg1Nzg1Mzg3LCJ1c2VyIjoiYWRtaW5pc3RyYXRvckB2c3BoZXJlLmxvY2FsIiwibmFtZSI6ImFkbWluaXN0cmF0b3JAdnNwaGVyZS5sb2NhbCIsInNjb3BlIjpbIkJBQ0tVUF9DT05GSUdfUkVBRCIsIkNSRURFTlRJQUxfUkVBRCIsIlVTRVJfV1JJVEUiLCJPVEhFUl9XUklURSIsIkJBQ0tVUF9DT05GSUdfV1JJVEUiLCJPVEhFUl9SRUFEIiwiVVNFUl9SRUFEIiwiQ1JFREVOVElBTF9XUklURSJdfQ.WCpUPRIm5A6X_406HTJF7TbTSa0g91_AQbt7OcBPblM' -d '{ "backupSchedules" : [ { "resourceType" : "SDDC_MANAGER", "frequency" : "WEEKLY", "daysOfWeek" : [ "MONDAY" ], "hourOfDay" : 12, "minuteOfHour" : 23 } ] }'
    Option Description
    Resource Type Enter SDDC_MANAGER.
    Frequency Enter HOURLY or WEEKLY.
    Days of Week Enter the days to back up SDDC Manager. When selecting multiple days, use a comma to separate them. For example: "daysOfWeek" : [ "SUNDAY", "THURSDAY" ]
    Note: Only available if the frequency is set to WEEKLY.
    Hour of Day Enter the hour of day to perform the backup.
    Minute of Hour Enter the minute of the hour to perform the backup.
    Note the <id> that gets returned.
  3. Track the status of the backup schedule configuration.
    curl -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIxN2M5YThmOC00NGQwLTQ5MzYtYjQwMC0xMzc5NzMyMjdmOWUiLCJpYXQiOjE1ODU3ODQ5MTgsInN1YiI6ImFkbWluaXN0cmF0b3JAdnNwaGVyZS5sb2NhbCIsImlzcyI6InZjZi1hdXRoIiwiYXVkIjoic2RkYy1zZXJ2aWNlcyIsIm5iZiI6MTU4NTc4NDkxOCwiZXhwIjoxNTg1Nzg4NTE4LCJ1c2VyIjoiYWRtaW5pc3RyYXRvckB2c3BoZXJlLmxvY2FsIiwibmFtZSI6ImFkbWluaXN0cmF0b3JAdnNwaGVyZS5sb2NhbCIsInNjb3BlIjpbIkJBQ0tVUF9DT05GSUdfUkVBRCIsIkNSRURFTlRJQUxfUkVBRCIsIlVTRVJfV1JJVEUiLCJPVEhFUl9XUklURSIsIkJBQ0tVUF9DT05GSUdfV1JJVEUiLCJPVEhFUl9SRUFEIiwiVVNFUl9SRUFEIiwiQ1JFREVOVElBTF9XUklURSJdfQ.Ya4XsZntsRHUZFRBNKGY7Js6xrGYGe8KdgJ2QbihFmg" -H 'Content-Type: application/json' -k -X GET https://SDDC_MANAGER_IP/v1/tasks/<id>|json_pp
    Replace <id> with the ID from the previous step.
  4. Repeat the previous step until the task status is SUCCESSFUL.