Friday, April 26, 2013

MariaDB/MySQL 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 .my.cnf file in your home directory:

[mysqldump]
user=root
password=your_mysql_root_password

Secure the file:  chmod 600 .my.cnf

Copy the contents of ../ttrss_utils/sample_conf/mariadb_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. ./mariadb_cron_backup

No comments:

Post a Comment