Search code examples
postgresqlvmwaredatabase-backupsvspherevcenter

vCSA 5.5 vPostgres backup routine


I would like to save a bourne shell script in /etc/cron.* on vCenter server virtual appliance 5.5 to backup the vpostgres (VMware vCenter postgresql database).

VMware knowledge base article 2034505 recommend stopping vpxd service before backing up. I suppose to prevent backing up the database in an inconsistent state (while vcenter operations are running).

However the official PostgreSQL documentation precises : <<3.Perform the backup, using any convenient file-system-backup tool such as tar or cpio (not pg_dump or pg_dumpall). It is neither necessary nor desirable to stop normal operation of the database while you do this.>>

My questions are:

  • Do I need to stop VMWare Composer and vpxd services prior to backing up the DB ?
  • If not can I use cpio to back it up without stopping the services ? how ?

PostgreSQL or VMware experts answers preferred please.


Solution

  • You may notice that this script does not stop VPXD services for backing up the database. It is because the official PostgreSQL documentation precises : “pg_dump is a utility for backing up a PostgreSQL database. It makes consistent backups even if the database is being used concurrently“.

    https://web.archive.org/web/20160122054619/http://bidabe.zapto.org/?p=360