[Box Backup] Box saved my a**/day
Jamie Webb
boxbackup@fluffy.co.uk
Sat, 11 Feb 2006 13:50:29 +0000
On Sat, Feb 11, 2006 at 01:14:23PM +0100, Stefan Norlin wrote:
> Yesterday (friday) a colleague of mine discovered he had
> overwritten a customer database (in MySQL) with a month
> old test data. Disregading from the fact that this should not
> be able to happen we were happy (as happy as can be in
> that situation) to discover that the files (around 50 MyISAM
> file) were relatively easy to recover via bbackupquery since
> old revisions of files are kept in the store. The latest versions
> were not usable but a generation back was.
Be wary of relying on direct backups of databases (for any DBMS). If
it's being modified as the backup is done, there's no guarantee (even
with journalling) that the results will be usable.
For MySQL, the simplest procedure is to run the following in a cron
job, and then back that file up instead.
mysqldump -u backup -A --opt > /some/path/backup.sql
Where backup is a user with select, reload, and lock tables rights on
all databases. There are more efficient/secure solutions that are more
complex.
-- Jamie Webb