I'm a backup fanatic.

Status
Not open for further replies.

Jayce

Fully Optimized
Messages
3,056
Location
/home/jason
I'd like to share my current setup with other Linux users.
I use Ubuntu Hardy Heron 8.04. I also am a huuuge Samba user which makes the below possible.

I just ordered two new 500gb hard drives @ $75 per. When I install them, here's what my setup will be.

Drive A - 250gb SATA - Main Drive with Ubuntu + XP Dual Boot.
Drive B - 250gb SATA - Backup drive. This drive will be housing a backup of Drive A's home directory (which contains all of my documents, music, pictures, etc).

Drive C - 500gb SATA - Using Samba, it will be shared out 3 ways to my two brothers and my mother so they can back up their files in case their computer dies. It will be accessible via mapped network drive that they can access on their Windows "my computer".
Drive D - 500gb SATA - Simply an Rsync'd copy of the Drive C. (a manual way of mirroring, if you will)


So basically, there's 2 hard drives used for myself... My main + a local backup of my main. Then, a drive for network storage + a drive that copies that for redundancy.



History:

I did some research and set this up after my one brother's computer kept bluescreening on him and just downright failing. He kept losing his data, plus on another occasion his hard drive died. Both of my brothers are running similar 1.1ghz Socket A AMD systems with 512mb RAM, and considering the computer's age (both are about 8-10 years) I'm a little shaky on that department so I like to keep backups of their stuff for their own sake. Also my mother uses her Dell as a centralized unit for picture managing, but yet despite her having a ton of CDs with pictures backed up, there's not a lot of consistency... her pictures on CD aren't always "up to date".

So basically, I took it upon myself as a learning experience to shell out a couple bucks and create a SAN in my own desktop computer.

Currently, my setup looks like this.

250gb - main drive, dual boot
250gb - backup + the other users in the house back up to that drive
200gb - rsync'd copy of the above drive.

Thing is, I hate having a 200gb drive being rsynced from a 250. If the 250 holds, say, 210gb of data, the 200 will go hay-wire due to a limited size. So, I wanted some consistency in the setup. Plus the 200gb drive is an IDE, and I'd like to go all SATA. So, here I am, making that change. This will also allow me to pop the 200gb IDE drive in my external enclosure. So it's a win-win.

To make this all happen (backup wise), what has to be done?

My mother and brothers have to do this:
Step 1: Copy their my documents folder (since their pictures, music, and other important files are housed in there).
Step 2: Paste to their network drive (which routes to their designated share on my computer)

What do I have to do to back up my stuff from Drive A to Drive B?
Step 1: Hit F2 (shortcut for terminal)
Step 2: Type "sudo backup"
Step 3: Type in my password, then sit back and watch the magic happen.
(Note - This step also rsync's Drive C's contents [network share for the other users] to Drive D).

You may think I'm nuts, but I've had enough lost pictures, lost documents, headaches, and anything else you can imagine with dealing with failed hardware and failed drives. Redundancy is key in the technology world, and that's just what I'm doing in my own household.

The End.
 
It sounds good, nice work.
A little suggestion though, why haven't you used raid1 to backup the drives? That way you always have the most recent changes in your data, instead of the last time you've typed "sudo backup". I've found this tutorial that you may want to take a look.
 
I've never set it up because I don't have raid capabilities, to my knowledge.

Last time I looked into it, it was something like this...

My motherboard supports software raid, and software raid sucks and is a headache to set up. Hardware raid is the best way to go, but is expensive.

It went something like that.

FYI - Me typing sudo backup isn't a big deal, and I can always set up a crontab scheduled command to run sudo backup at whatever time I choose. Regardless, for me, this works. I'd love to have raid, but from what I've seen it's not really an option... unless you know of a way it can be for me at an unusually low cost??
 
Sure thing. It's actually very simple.

#!/bin/bash
sudo mount /dev/sdb2 /media/share
sudo mount /dev/sda1 /media/drivec
sudo rsync -a --progress --delete --exclude=.gvfs ~/ /media/share/jason
sudo rsync -a --progress --delete --exclude=.gvfs /media/share /media/drivec

So essentially,
sdb2 is my backup partition of Drive B.
sda1 is my backup partition of Drive C.

My home directory gets copied to sdb2... and sda1 copies sdb2.

--progress is a nice tag to have, considering that in terminal I can see exactly what's being transferred (even though it happens very fast)

--delete is a good tag so that way I don't accumulate other BS files. For example, say I have 80 gig of mp3s in my "Music" folder. But, I rename my "Music" folder to "My Music." Now, I'll have Music + My Music. If I use the --delete tag, it deletes what is NOT present on Drive A.

--exclude=.gvfs is something I added with Hardy Heron. gvfs is a hidden folder in your home directory. For some reason, I was getting rsync errors with gvfs, and since I rsync to back up mainly pictures and music, I just exluded gvfs so I could proceed without errors to do backups. So, before running into gvfs errors, my command was simply
sudo rsync -a --progress --delete ~/ /media/share

You'll just have to manipulate your script according to your drive configuration (which I'm sure you can see via sudo fdisk -l)

And, ya know, gotta do sudo chmod +x "backup-script-here" to make the thing executable.

Hope this helps!
 
Very nice. I don't blame you one bit for creating a good backup setup. I too have had tons of stuff lost due to failing hard drives and other horrible things that can go wrong.

Right now I use Time Machine in OS X to backup my laptop, but I also backup certain other things to another drive.

Nice setup.
 
Thanks jayce, I am a bit parrnoid myself atm with back up's as my tape drive messed up on me an now i am wondering if the tapes it's self are buggerd up.
 
Status
Not open for further replies.
Back
Top Bottom