Location>code7788 >text

[VMware VCF] Back up the configuration files of VCF core components using an SFTP server.

Popularity:694 ℃/2024-10-06 13:31:34

Configuration backups can be created on a regular basis for relevant core components in a VMware Cloud Foundation environment, such as SDDC Manager, NSX Manager, and vCenter Server, to prevent recovery in the event of an unexpected failure or data loss. By default, backups of NSX Manager components are created and stored on the SFTP server built into the SDDC Manager appliance, and it is recommended that a separate external backup server be created in place of the default backup location.

The following is a demonstration of an SFTP backup server as an exampleVCF Core Component Backup ConfigurationThe process.

 

I. SFTP Backup Server

The environment is prepared with an SFTP backup server to serve as a backup location for these components, based on the CentOS distribution.

Create a user on the SFTP backup server that is dedicated to backups.

useradd -m vcf-backup
passwd vcf-backup
chage -M 99999 vcf-backup

The directories for creating backups on the SFTP backup server are only the vcf and vcsa directories because the SDDC Manager and NSX Manager components share the same configuration directory. Note Make sure that the directories used for backup have enough space.

mkdir -p /backup/vcf
mkdir -p /backup/vcsa
chown -R vcf-backup /backup

Test locally that the SFTP backup server is connected, uploading and downloading properly.

sftp vcf-backup@

 

SDDC Manager Backup

Log in to the SDDC Manager UI and navigate to Administration - > Backup - > Site Settings. By default, an internal SFTP server is configured in SDDC Manager and the configuration files for SDDC Manager and NSX Manager are backed up in SDDC Manager. Adjust the default backup location to the backup server prepared above by configuring it as an external SFTP server.

You can use the following command to get the SSH fingerprint of the SFTP server on the SDDC Manager or SFTP server.

ssh-keygen -lf <(ssh-keyscan -p 22 -t rsa  2> /dev/null) | cut -d' ' -f2
ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub

Configure the SFTP server address, backup directory and other information. Note that the encrypted password phrase needs to be saved with care, and the encrypted password is required to perform the restore process.

After you save the configuration, the SDDC Manager and NSX Manager components begin to configure.

The configuration status can be viewed in the taskbar.

Go to SDDC Manager Configuration and click Backup Now to start SDDC Manager configuration backup.

You can create a backup task schedule for SDDC Manager by clicking Edit after "Backup schedule".

 

NSX Manager Backup

Log in to the NSX Manager UI (VIP) and navigate to Lifecycle Management - > Backup and Restore, where you can manage backup configurations for NSX Manager components.

Click Edit at SFTP Server, you can see that NSX Manager follows the backup configuration in SDDC Manager by default, you can customize the backup configuration to change to another SFTP server.

Click Edit at the schedule to create a backup scheduling task for NSX Manager configuration backups.

SFTP server to view the backed up configuration file.

 

vCenter Server Backup

Log in to the vCenter Server VAMI (https://vcenter-ip-or-fqdn:5480) management backend and navigate to Backup, where you set the backup configuration for the vCenter Server components.

Click "Configuration" and fill in the SFTP server parameters to create a backup scheduling task.

The backup scheduling task has been successfully activated, however, the backup will not start immediately, but will take place at the time set by the scheduling task.

You can manually click Backup Now to start the vCenter Server configuration backup immediately.

The vCenter Server configuration backup is complete.

SFTP server to view the backed up configuration file.