Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mysql dumps and flushes

Status
Not open for further replies.

bertieuk

IS-IT--Management
Jun 1, 2004
175
I have recently taken responsibility for mysql backups after the sudden departure of our guru.

After some advice......

We currently perform nightly dumps of around 600 mysql databases. The databases are pulled from the mysql server to a backup server using mysqldump. we use the following script on the backup server:

#!/bin/bash

DBS=`/usr/bin/mysql -h <IP Remote mysql Server> -u <user> --password=<password> -B -N -e "show databases;"`

for db in $DBS
do
`mysqldump -v -h <IP Remote mysql Server> -u <user> --password=<password> $db > localbackuppath/$db.sql`
done

/usr/bin/mysqladmin -h <IP Remote mysql Server> -u <user> --password=<password> flush-logs


Backup seems to be working, although the flush is throwing out errors.......a couple of questions from this (and I will research further myself).....

1) Are the mysqldump switches optimal....should there be any more, less, better way of doing it.....thinking about ease of restores.

2) Is the flush writting transactional data back to the databases. Does this affect the .BIN file

3) Do I need to copy any other files at backup such as BIN files

4) Are the number of BIN files controlled by flush? Can housekeeping be performed to get rid of redundant files?

Thanks
SI
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top