The faulty hard drive i have will be the perfect place to have a daily task at say 3 in the morning to do an rsync of differences.

It would back up:

  • Mp3’s
  • Complete Mysql database, only keep last n copies
  • wordpress directory
  • mythtv home directory

Even if this disk did die, it wouldnt particulary matter, it would just be quite useful as a secodary back up. I have marked all badblocks with fsck.ext3 and then mounted the drive.

My simple solution was to create a bash file with the following, chmod +x, and add it to the crontab

Mainly it dumps my whole mysql database and Rsyncs any files i want to backup

DATE=`date +’%m-%d-%Y’`

mysqldump -c –password=xxx -A > /mnt/backup-drive-faulty/mysqlbackups/mythsq
l.dump.$DATE

rsync -av –delete /home/tomas /mnt/backup-drive-faulty/root-backup/
rsync -av –delete /root /mnt/backup-drive-faulty/root-backup/
rsync -av –delete /home/etc /mnt/backup-drive-faulty/root-backup/
rsync -av –delete /usr/share/wordpress /mnt/backup-drive-faulty/root-backup/
rsync -av –delete /home/mythtv /mnt/backup-drive-faulty/root-backup/
rsync -av –delete /mnt/store2/music /mnt/backup-drive-faulty/music

Seems to do the job nicely, not the best solution, but its quick and works.

One Response to “Broken Hard Drive – Rsync Backup Solution”
Trackbacks
  1. Red says:

    Red…

    I guess it’s ok…

Leave a Reply