Backup Your MySQL Database Daily!

21/05/2014 // 0 Comments

Here is quick guide to backup your MySQL database daily: This guide is prepared on Ubuntu 12.04LTS, MySQL 5.5. Save this script anywhere in your database server:

* Edit the red texts for your environment. This script will use /home/username/mysqlbackup folder to save the backup files. It will delete the backup files which are 7 days old. It will hold 8 backup files. Make the the script file executable:

Test the script by running manually before adding to your crontab.

Add the script to crontab to run it daily:

This job will run at 03:00 everyday.

Keystone Flushing Old Tokens

21/05/2014 // 0 Comments

If you do not flush old tokens from your database, it will be as big as Godzilla. You need to clear the tokens from the keystone database time to time. In Havana version, there is a new CLI command to flush the keystone tokens:

I suggest to put it in your crontab file for daily run. Add this line to /etc/crontab file in your Controller node which keystone server is installed:

This command is going to run everyday at 03:00 and clear your DB for old tokens.