User Tools

Site Tools


vmware:backup_linux_appliance

Backing up and restoring the vCenter Server Appliance (vPostgres) database

Symptoms

This article provides steps to back up and restore the vCenter Server Appliance vPostgres Database.

Note: VMware introduced the VMware vPostgres database as the embedded database packaged with the vCenter Server Appliance in vCenter 5.0 Update 1a and later. Resolution Backing up the embedded vPostgres database

To back up the embedded vPostgres database:

  Connect to the vCenter Server Appliance using SSH.
  When prompted, log in as the root user. The default password is vmware.
  In the vCenter Appliance virtual machine, go to the vPostgres utility directory using this command:
  cd /opt/vmware/vpostgres/1.0/bin
  Run this command to back up the vCenter Server database:
  ./pg_dump EMB_DB_INSTANCE -U EMB_DB_USER -Fp -c > VCDBBackupFile
  Where VCDBBackupFile is the database backup file.
  Note: You are prompted to enter the EMB_DB_PASSWORD password.

<box 100% blue |The vCenter Server Appliance database configuration file /etc/vmware-vpx/embedded_db.cfg contains the values for:>

      EMB_DB_INSTANCE
      EMB_DB_USER
      EMB_DB_PASSWORD

</box>

Restoring from the backend vPostgres database file

To restore from the backed up vPostgres database file, run this command:

PGPASSWORD=EMB_DB_PASSWORD ./psql -d EMB_DB_INSTANCE -Upostgres -f VCDBBackupFile

Note: Ensure that you take a snapshot of the vCenter Server Appliance virtual machine. This ensures that you have a copy of the database from the snapshot even if the restore process fails.

vmware/backup_linux_appliance.txt · Last modified: 2021/01/01 21:25 (external edit)