[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Good backup software for Linux



On Mon, Jun 20, 2005 at 01:57:56PM +0100, Dave Howorth wrote:
> Siju George wrote:
> >Relational Database Systems (RDBMS) cannot be backed up while live.
> 
> This is just a fact of life, true for any backup system. It depends what 
> guarantees of integrity you need and what table types you're using. I 
> use InnoDB and want error-free backups so I just send '/etc/init.d/mysql 
> stop' as my 'pre-client' command and '/etc/init.d/mysql start' 
> afterwards. An alternative is to run a mysql replica. I recommend 'High 
> Performance MySQL' by Zawodny & Balling for a survey of issues and 
> techniques.

I recommend using mysqlhotcopy:

$ whatis mysqlhotcopy
mysqlhotcopy (1)     - fast on-line hot-backup utility for local MySQL databases and tables

maurits@mauritsvanrees:~$ apt-file search mysqlhotcopy
mysql-server: usr/bin/mysqlhotcopy
mysql-server: usr/share/man/man1/mysqlhotcopy.1.gz
mysql-server-4.1: usr/bin/mysqlhotcopy
mysql-server-4.1: usr/share/man/man1/mysqlhotcopy.1.gz

DESCRIPTION from the man page:

#####################
mysqlhotcopy is designed to make stable copies of live MySQL
databases.

Here "live" means that the database server is running and the database
may be in active use. And "stable" means that the copy will not have
any corruptions that could occur if the table files were simply copied
without first being locked and flushed from within the server.
#####################

Also: take a look at mysqldump. Something like:

mysqldump --opt --all-databases > all_databases.sql

should work. You can make a script using both mysqlhotcopy and
mysqldump and automatically run that just before you backup.

-- 
Maurits van Rees | http://maurits.vanrees.org/ [Dutch/Nederlands] 
Public GnuPG key: keyserver.net ID 0x1735C5C2
"Let your advance worrying become advance thinking and planning."
 - Winston Churchill

Attachment: signature.asc
Description: Digital signature


Reply to: