Yes.
Why should I bother to write this? I'll outsource the task to the authors of High Performance MySQL, Second Edition, page 475:
Backup Myth #1: "I Use Replication As a Backup"
This is a mistake we see quite often. A replication slave is not a backup. Neither is a RAID array. To see why, consider this: will they help you get back all your data if you accidentally execute DROP DATABASE on your production database? RAID and replication don't pass even this simple test. Not only are they not backups, they're not a substitute for backups. Nothing but backups fill the need for backups.
--------
#!/bin/bash
HOME=
date=`date "+%Y-%m-%dT%H:%M:%S"`
rsync -aP --link-dest=$HOME/backup/current /home
$HOME/backup/back-$date
rsync -aP --link-dest=$HOME/backup/current /etc $HOME/backup/back-$date
rm $HOME/backup/current
ln -s back-$date $HOME/backup/current
#see if the disk is getting full
FREE=`df -lk|grep sdb1|awk -F" " '{print $5}'|awk -F"%" '{print $1}'`
#alert me if the backup disk is getting full.
T=80
if [ "$FREE" -gt "$T" ]
then
df -lk| mail $myaddress -s"disk alert $T% capacity"
else echo "backup disk is less than $T full"
fiI thought delayed replication was one of the main strategies they advocated in that book. I don't have it on hand. my mistake.
It's also not useful if your main files get corrupted and you diligently propagate the corruption. See: ma.gnolia
As far as the database goes, I'm big on stored procs + archive tables, but i'll leave that to the grown ups ;)
Whereas, a policy of automatically backing up everything except for your exclude list would have saved your bacon.
I don't mean to be rude, I don't know anything about you, but if you were a system administrator working for me, today would be your last day.
It's like reading an airline crash report, which I'm told often ends up sounding like a comedy of errors. Most airline crashes have an entire handful of causes, all of which are individually innocent, but on the one extremely rare occasion when they all happen at the same time they add up to disaster.
I'm always amazed at the number of people who spend their time thinking about replication strategies without understanding that data can be accidentally deleted in production too. I guess backups look "easy", so it's not as sexy an area of architecture planning.
Job security note for sysadmins: When someone suggests a disaster scenario, don't open your response with a laugh.
LOL! And if you get a corrupt block on your primary site, what're you going to do? All your standbys are instantly tainted!
Better leave this one to the grownups.
Spinning disks are good though. A lovely spot for backups. Just put them in a different building.
Edit: In the time it took me to write this 5 other people also lambasted this poor fellow. Ouch.
Redundancy is not a backup. If someone with full admin control to your system can destroy all of your data then you do not have backups. A proper backup is physically separate from your primary data and, preferably, can't be destroyed with mere admin access to the system. The number of sites that have had catastrophic data loss due to relying on mirroring instead of true backups is quite significant.
it's much better to ask yourself how long to replicate your existing system then how to back up. pxe boot to a kernel that you can install over the network with, bcfg2 to get the thing up to spec, start copying data.
a lot of machines can be back and configured in 5 minutes.
that said, i'm not you. i don't have terabytes of data to do statistics on. maybe there are other horrible details i'm forgetting. fast rebuilding is a pretty awesome strategy for a lot of cases.