Results 1 to 10 of 11
Hi all,
I have an idea for a backup solution, just like to see if it would actually work
Note: I'm looking for a non raid solution at the moment
...
- 09-05-2010 #1Just Joined!
- Join Date
- Sep 2010
- Posts
- 7
Help with a backup solution
Hi all,
I have an idea for a backup solution, just like to see if it would actually work
Note: I'm looking for a non raid solution at the moment
Ideally I'd like to use my 2nd HDD as a full drive backup in case the 1st HDD dies. Then the 2nd one can replace the 1st.
So I was thinking if I first do a full drive clone to my 2nd HDD, then use rsync to keep it updated.
my 1st drive looks like this
If I have cloned the 2nd hdd, could I then mount each partition under say /backup. egCode:/dev/sda5 7.8G 917M 6.5G 13% / /dev/sda8 645G 1.4G 611G 1% /home /dev/sda6 996M 35M 910M 4% /tmp /dev/sda3 7.8G 3.9G 3.6G 52% /usr /dev/sda2 9.7G 431M 8.8G 5% /var /dev/sda1 122M 18M 98M 16% /boot tmpfs 1.9G 0 1.9G 0% /dev/shm
/dev/sdb8 --> /backup/home
/dev/sdb6 --> /backup/tmp
/dev/sdb3 --> /backup/usr
etc......
If the main HDD ever dies then I could replace HDD2 with HDD1 and mount them as expected
/dev/sda8 --> /home
/dev/sda6 --> /tmp
/dev/sda3 --> /usr
etc.....
Would this actually work?
Thank you
- 09-06-2010 #2Just Joined!
- Join Date
- Aug 2010
- Posts
- 89
Should work, I already cloned a disk using rsync (and rebuilding bootloader).
The best way to know is to try to boot your second disk.
- 09-06-2010 #3
Also, have a look at /etc/fstab.
You will most likely have to modify it beforehand or from a liveCD, if you really want to boot from the second harddisc.You must always face the curtain with a bow.
- 09-06-2010 #4Just Joined!
- Join Date
- Aug 2010
- Posts
- 89
In the described scenario (disk 1 failed and removed), the second disk will be the 1st, so it should be sda again and no changed needed. Also modern distro use LABEL in fstab.
- 09-06-2010 #5
..and labels would fail

Either you give the same label to the corresponding partitions, which results in conflicts.
Or the second harddisc has none (or other) labels, then fstab needs to be edited.You must always face the curtain with a bow.
- 09-06-2010 #6Just Joined!
- Join Date
- Aug 2010
- Posts
- 89
You're right, label have to be removed from fstab. But then no edit is needed in case of 1st disk broken as the 2nd disk will be the 1st and seen as sda
- 09-06-2010 #7Just Joined!
- Join Date
- Sep 2010
- Posts
- 7
I have my current fstab file below, what changes if any would I need to make on the 2nd HDD /etc/fstab so it would boot?
Thank youCode:LABEL=/ / ext3 noatime,defaults,usrquota 1 1 LABEL=/home /home ext3 noatime,defaults,usrquota 1 2 LABEL=/backup /backup ext3 noatime,defaults 1 2 LABEL=/tmp /tmp ext3 noatime,defaults 1 2 LABEL=/usr /usr ext3 noatime,defaults,usrquota 1 2 LABEL=/var /var ext3 noatime,defaults,usrquota 1 2 LABEL=/boot /boot ext3 noatime,defaults 1 2 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 LABEL=SWAP-sda7 swap swap defaults 0 0
- 09-07-2010 #8Just Joined!
- Join Date
- Sep 2010
- Posts
- 7
I did a little test in a VM, I cloned HDD1 to HDD2, I didnt mount the 2nd drive, but when I tried to restart the machine it failed. It would only boot once I deleted the contents of HDD2. Hmmmm
- 09-07-2010 #9Just Joined!
- Join Date
- Aug 2010
- Posts
- 89
I would check changing the label based fstab by a device based fstab (using /dev/sda1, ... instead of LABEL=/xxxx
- 09-08-2010 #10Just Joined!
- Join Date
- Sep 2010
- Posts
- 7
Ill try that in my VM and report back the results. Thanks!


Reply With Quote