Backup of VCSA vPostgres database fails due to .pgpass file missing/corrupt on vCenter Appliance
book
Article ID: 305761
calendar_today
Updated On:
Products
VMware vCenter Server
Issue/Introduction
- Backup of vCenter Server Appliance vPostgres database is not successful
- Backup file is created with 0 kb of data
- vCenter - /var/log/vmware/applmgmt/backup.logs are not updated
Environment
VMware vCenter Server 6.x
Cause
This occurs when the .pgpass file is missing or is corrupted.
Resolution
To resolve this issue, re-created the .pgpass file.
- Copy the format of .pgpass from a working vCenter
- Ensure permissions match below after copying
root@vcenter [ ~ ]# ls -la
~
-rw------- 1 root root 302 Jul 12 2018 .pgpass
~
Below is an example of the contents of the .pgpass file
localhost:5432:replication:replicator:+?2%fBGy4=l(S9$J
127.0.0.1:5432:replication:replicator:+?2%fBGy4=l(S9$J
localhost:5432:postgres:postgres:Nf4hK*?u9ZV(CO)e
127.0.0.1:5432:postgres:postgres:Nf4hK*?u9ZV(CO)e
localhost:5432:VCDB:postgres:Nf4hK*?u9ZV(CO)e
127.0.0.1:5432:VCDB:postgres:Nf4hK*?u9ZV(CO)e
- Replace the postgres password from above template and replace it with postgres password of vCenter.
Note: Retrieve the postgres password from the following file: /etc/vmware/service-state/vpxd/embedded_db.cfg
Feedback
thumb_up
Yes
thumb_down
No