4 ms·
maybe there are other horrible details i'm forgetting Yes. Why should I bother to write this? I'll outsource the task to the authors of High Performance MySQL
by mechanical_fish 17y ago
maybe there are other horrible details i'm forgetting
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.
- gvb 17y agoObligatory xkcd link: "Bobby Tables" http://xkcd.com/327/ http://xkcd.com/327/
- jfoutz 17y agoCompletely reasonable response, forgive me for being an inarticulate noob in my post. I thought delayed replication was one of the main strategies they advocated in that book. I don't have it on hand. my mistake.
- diego 17y agoThis is the incremental backup script I use on my Linux box at home, a quick-and-dirty imitation of what Time Machine does. Obviously $HOME/backup is a different physical disk. Feel free to improve on this. -------- #!/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" fi
- Locke1689 17y agoYou should think about keeping an offsite backup if possible. A second disk won't necessarily help if your computer gets dropped in a pool, house catches on fire, etc.
- sandGorgon 17y agothat is very interesting - I though replication was the nearest to realtime "backup" as one could get. Is there any other way, one can do incremental, realtime backups for, say, mysql/postgres ?