News for hackers. Stuff that matters.
Re:Let's Stop Talking About "Backups" by mechanical_fish on Monday December 14, 2009 @12:14PM (#994505)
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.

Re:Let's Stop Talking About "Backups" by diego on Monday December 14, 2009 @01:02PM (#994626)
This 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
Re:Let's Stop Talking About "Backups" by Locke1689 on Monday December 14, 2009 @03:45PM (#995045)
You 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.
Re:Let's Stop Talking About "Backups" by jfoutz on Monday December 14, 2009 @01:01PM (#994625)
Completely 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.

Re:Let's Stop Talking About "Backups" by sandGorgon on Tuesday December 15, 2009 @02:31AM (#996112)
that 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 ?
Re:Let's Stop Talking About "Backups" by gvb on Monday December 14, 2009 @12:23PM (#994527)
Obligatory xkcd link: "Bobby Tables" http://xkcd.com/327/