
What is a bad day? How do you define it? Its very definition varies from person to person and from job to job. For some, a bad day is when they lose the bus or the subway and are late for work.
For others, a bad day is when their hair looks weird or they can’t find a good parking lot. For economists and bankers, a bad day is when…well, everyday, given the current economical climate.
For the average programmer a bad day is when he manages to fuck up something on a epic scale on the production server. Let’s say a database with thousands of users. Today it happened to…well…this friend of mine.
Luckily my friend backups his work on a daily basis and is prepared for such situations. One of the scripts he uses for this is the awesome AutoMySQLBackup script, which I – I mean he recommends to all of you. It’s really simple to use, all you have to do are some minor configurations and add the script to be ran daily as a cron job.
Real men *do* use backups!
I did not look at the script in detail, but I made a search on “flush” as in –flush-logs or -F. No results found. This is pretty bad as you loose all data from the moment of the backup to the moment of the crash.
Real men use binary logs!
Some backup is better than no backup
If you have a better solution for automated backups, please, share it with us.
Take a look at this page, it explains it all:
http://dev.mysql.com/doc/refman/5.0/en/backup-policy.html
Cheers
RTFM, heh? I’ll look into it
Backups do not need to be a hassle. A half-decent backup cron will run for years!