Thursday, May 23, 2013

PostgreSQL Database Backup on Fedora

This procedure requires you first setup the TTRSS UTILS environment described in the post:  TTRSS  UTILS - Fedora Tiny Tiny RSS Utilities

This method uses CRON under your own userid and pulls db_name and db_user information from your TTRSS config.php

Backup files will be stored in $home/ttrss_maint/db_backup/ and will be retained for 14 days.

Create a .pgpass file in your home directory:
*:*:ttrss_db:ttrss_user:ttrss_user_password

Secure the file:  chmod 600 .pgpass

Copy the contents of ../ttrss_utils/sample_conf/db_backup_crontab into your crontab:  crontab -e
Replace xxxxx with your account_name.

If you wish to run the backup manually:
  1. cd $home 
  2. cd ttrss_maint/ttrss_utils 
  3. ./pgsql_cron_backup

No comments:

Post a Comment