PowerVCF v2.0 - Backup and Restore of SDDC Manager - Configuration (Part 1)

In this blog series, I'm going to take a look at how you perform the configuration, backup and restore of SDDC Manager using PowerVCF v2.0. Why use PowerVCF you might be asking well the simple answer is that in order to perform the backup and restore procedures of SDDC Manager you have to use the Public APIs for VMware Cloud Foundation. From a VMware Cloud Foundation documentation perspective the relevant information can be found at the following locations:

Configuring a Backup Target for SDDC Manager

Part one of this blog series will take a look at configuring SDDC Manager with an external backup target.

By default following a successful deployment of VMware Cloud Foundation, SDDC Manager is configured to backup to itself, and when you log into the administration user interface a banner message is displayed stating that you should reconfigure. For the purpose of testing I use my VMware Cloud Builder appliance as this is enabled with an SFTP service but before performing the reconfiguration of SDDC Manager I need to perform some additional steps on the VMware Cloud Builder appliance itself.

Procedure

1. Connect to the VMware Cloud Builder appliance using and SSH client such as Putty and log in using the admin user.

2. Create a new local service account called svc-vcf-bck. Enter the following command:

sudo useradd -m -p $(openssl passwd -1 'VMw@re1!') svc-vcf-bck

NOTE: There is a requirement in VMware Cloud Foundation 4.0 where you must have a home directory, this is becuase when the backup API is run it checks for the existence, this is something that will be addressed in the next release.

3. Sudo as the new service account and create the target folder for backups. Enter the following commands:

sudo su - svc-vcf-bck
mkdir /tmp/backups

4. Create the JSON spec for configuring an external backup target in SDDC Manager. To obtain the sshFingerprint run the following command on the VMware Cloud Builder Appliance and copy / paste into the JSON spec:

ssh-keygen -lf <(ssh-keyscan -t ssh-rsa -p 22 172.28.211.60 2>/dev/null)
{
    "backupLocations": [ {
        "directoryPath": "/tmp/backups/",
        "password": "VMw@re1!",
        "port": 22,
        "protocol": "SFTP",
        "server": "172.28.211.60",
        "sshFingerprint": "SHA256:sptZq0mdjboC9AT8hZ8sz16c1JWIQxaFof/T407RnQg",
        "username": "svc-vcf-bck"
    } ],
    "encryption": {
        "passphrase": "VMw@re1!VMw@re1!"
    }
}

5. Open a PowerShell console and connect to SDDC Manager using the PowerVCF cmdlet Connect-VCFManager. Enter the following command:

Connect-VCFManager sfo-vcf01.sfo.rainpole.io [email protected] VMw@re1!

6. Configure SDDC Manager with the external backup target using the PowerVCF cmdlet Set-VCFBackupConfiguration. Enter the following command:

Set-VCFBackupConfiguration -json E:\MyLab\backupConfiguration.json

7. Check the status of the task by using the PowerVCF cmdlet Get-VCFTask. Enter the following command:

Get-VCFTask -id 60f7fc20-ab69-4e51-8730-57258f9af7d7

8. Check the configuration using the PowerVCF cmdlet Get-VCFBackupConfiguration. Enter the following command:

Get-VCFBackupConfiguration

There you have it that completes the steps for configuring SDDC Manager to use an external backup source. In my next post I will walk through the process of performing the backup.

Posts in this Series