mogulsurf
Contributor
Contributor

vcenter appliance embedded database backup fails

Hi experts. vmw newbie here

I have a vcenter 5.5 appliance which just died can't connect to it via vsphere

I notice during startup that the database failed to load so googleling around i saw a couple of things to try

but first i want to take a backup of the embedded DB and i found this article

VMware Knowledge Base

however when I run the backup cmd it fails with then below

LBLRALVC1:/opt/vmware/vpostgres/current/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='Tq&LYekN&9e+H^}m'

EMB_DB_STORAGE='/storage/db/vpostgres'

LBLRALVC1:/opt/vmware/vpostgres/current/bin # ./pg_dump VCDB -U vc -Fp -c > /tmp/VCDBbak

pg_dump: [archiver (db)] connection to database "VCDB" failed: could not connect to server: No such file or directory

        Is the server running locally and accepting

        connections on Unix domain socket "/tmp/.s.PGSQL.5432"

what am i missing here.

not very good at cli so please if you have any suggestion please include the command i need to use

Seems like it can't find the database file VCDB?

thanks in advance

0 Kudos
3 Replies
MartinGustafsso
VMware Employee
VMware Employee

Is the postgres service started?

service vmware-vpostgres status

0 Kudos
mogulsurf
Contributor
Contributor

I checked and the server is not running

but if i try to start i fails with this error

LBLRALVC1:/ # service vmware-vpostgres start

Starting VMware vPostgres: pg_ctl: failed to find server pid

Examine the log output.

here is the config output

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='Tq&LYekN&9e+H^}m'

EMB_DB_STORAGE='/storage/db/vpostgres'

when i try to run a backup of the DB I get this

LBLRALVC1:/opt/vmware/vpostgres/current/bin # ./pg_dump VCDB -U vc -Fp -c > /tmp /DBBakup

pg_dump: [archiver (db)] connection to database "VCDB" failed: could not connect to server: No such file or directory

        Is the server running locally and accepting

        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

thanks in advance

Dave

0 Kudos
MartinGustafsso
VMware Employee
VMware Employee

That doesn't look good. You can't create a backup because the service is stopped.

This would have to be investigated by our support. Please raise a support request.

VMware Support & Downloads for Desktop, Application & Data Center Virtualization

0 Kudos