Backup all mysql databases to separate dump files

May 5th, 2010 by Rudolf

Backup all mysql databases to separate dump files

With this script I backup my whole MySQL database into separate files. Restoring a broken DB is easier this way.

I included the possibility to keep 3 days worth of snapshots plus any backup older thanĀ  3 days will be removed automatically.

#!/bin/bash
# (c) 2007-2010 rmaduro backup all mysql databases
bakdir=/home/backup/backups
user=backup
password=xxxx
#
date=`date -I`
for i in /var/lib/mysql/*/; do
dbname=`basename $i`
mysqldump -u $user --password=$password $dbname > /$bakdir/$dbname-$date.sql
done
#cd to backupdir
cd $bakdir
#give to correct readonlyrights
chmod 600 $bakdir/*.sql
# Remove files older than 3 day from backupdir - don't touch code below!
#
find $bakdir -type f -mtime +3|xargs -i rm -f {}
#
#done
#

, , , , , ,

Nagios remote server monitoring with nagstamon

May 4th, 2010 by Rudolf

Nagios Remote server monitoring with nagstamon

Our Nagios VPS servers are fully compatible with the popular Nagios Desktop utility Nagstamon.

Nagstamon is a Nagios status monitor which resides in systray or desktop (GNOME, KDE and Windows) as floating statusbar to inform you in realtime about the status of your hosts and services. It allows to connect to multiple Nagios and Opsview servers.

Download Nagstamon utility from http://sourceforge.net/projects/nagstamon/

You can even try it on a demo server! … read more …

, , , ,

Next Entries »