Kurt A. Brust wrote:
What is the best way to do this? also what should be backed up?
Just use pg_dump to create a self-consistent snapshot of the database. Hopefully you have some general backup scheme to back up your systems, which will safeguard your RT customizations (RT_SiteConfig.pm at a minimum) as well as the database snapshot you create.

E.g., I have a crontab for the 'postgres' superuser, which backs up my RT database (called rt3) to a single compressed SQL file:

# Do a dump every day at 6:45pm
45 18 * * * /usr/local/pgsql/bin/pg_dump rt3 | gzip -c >/usr/local/pgsql/dumps/rt3.daily.dump.gz

This dump can be slurped right into psql to restore the database if needed: gunzip -c rt3.daily.dump.gz | psql

You could also use the 'custom' option on pg_dump, which can be used in concert with the pg_restore utility for greater flexibility.

See the man page for pg_dump.

When you do major postgresql version upgrades, you need to do dumps/restores, so it's good to know how to do this.

-Kevin Murphy

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com

Reply via email to