9.3.2

Table Of Contents
Schedule Database Backups
You can schedule automated backups of your vFabric Postgres databases to protect your data.
You schedule vFabric Postgres backups to run periodically at fixed times, dates, or intervals using the cron
utility. The cron files to schedule backups are located in /opt/vmware/vpostgres/current/etc. The files are
pg_rman_daily.cron, pg_rman_weekly.cron and pg_rman_monthly.cron, and provide full backups daily,
weekly, or monthly.
You can create your own customized backup plan using the default cron files as a template.
Prerequisites
You must be able to log in as the root user.
Procedure
1 Log in as the root user.
2 Run the script /opt/vmware/vpostgres/current/etc/script_name to specify the frequency of backups
you wish to implement.
This example specifies a weekly backup of the database.
crontab -u postgres /opt/vmware/vpostgres/current/etc/pg_rman_weekly.cron
Specifying one of the above listed cron scheduling files initiates a full, rolling backup of the database daily,
weekly, or monthly.
What to do next
The pg_rman utility is enabled by default. To temporarily halt or otherwise stop vFabric Postgres backups
you must disable pg_rman backups using the crontab utility.
Disable Database Backups
vFabric Postgres performs database backups using the pg_rman utility. To temporarily halt or otherwise stop
backups you disable database backups using the crontab utility.
Prerequisites
You must be able to log in as the root user.
Procedure
1 Log in as the root user.
2 Run the crontab command with the -r option. This removes the crontab job.
crontab -r postgres /opt/vmware/vpostgres/current/etc/pg_rman_weekly.cron
About vFabric Postgres Replication
Replication is the sharing of data between redundant resources to improve reliability, fault-tolerance, and
accessibility. You can replicate a vFabric Postgres database to provide an added degree of fault tolerance
and redundancy to your database environment in the event a database instance fails, or otherwise becomes
unavailable.
The scripts integrate the replication features of the community version of PostgreSQL with vFabric Postgres.
The scripts perform slave creation, node promotion, and replication monitoring among vFabric Postgres
nodes.
n
All slaves use streaming replication to catch up with master in asynchronous mode.
Chapter 4 Managing vFabric Postgres
VMware, Inc. 31