首先命令行远程登录到VCSA服务器,然后执行如下命令停掉VCSA的核心服务vmware-vpxd:
备份VCSA内置Postgresql数据库_vcda

  1. vCenterServerAppliance:~ # service vmware-vpxd stop
    Stopping VMware vSphere Profile-Driven Storage Service…

Stopped VMware vSphere Profile-Driven Storage Service.( o0 w8 T3 k: R
Stopping tomcat: success) {# T- u$ ^( \4 l; F" i. [
Stopping vmware-vpxd: success

Shutting down ldap-server…done

2、接着,执行如下命令来到postgresql的bin目录:
#cd /opt/vmware/vpostgres/1.0/bin

3、执行cat命令查看DB的配置讯息:

vCenterServerAppliance:/opt/vmware/vpostgres/1.0/bin # cat /etc/vmware-vpx/embedded_db.cfg

EMB_DB_INSTALL_DIR=‘/opt/vmware/vpostgres/9.0’

EMB_DB_TYPE=‘PostgreSQL’
EMB_DB_SERVER=‘127.0.0.1’
EMB_DB_PORT=‘5432’

EMB_DB_INSTANCE=‘VCDB’
EMB_DB_USER=‘vc’
EMB_DB_PASSWORD=‘7Uz($Q4tY6’
EMB_DB_STORAGE=‘/storage/db/vpostgres’

4、记录下第3步中的用户和密码,然后执行如下命令,开始备份:
vCenterServerAppliance:/opt/vmware/vpostgres/1.0/bin # ./pg_dump VCDB -U vc -Fp -c > /tmp/VCDBbackup

5、完成备份后,即可重新启动服务
#service vmware-vpxd start