3

I am looking to have a backup copy of my hard drive incase of failure. Ideally I would like this to backup nightly. I want to be able to have 2 HD's installed in the system at the same time and boot off of either drive if the other failed.

I have seen some solutions with DD, but I am not sure that that is the best way to handle this, as I tried it, but then could never get the drive to boot.

Currently I am trying this: How to upgrade my HDD and keep my ubuntu 11.10 instalation

But that doesn't run nightly.

I see this: How to replace my disk without having to rebuild my Ubuntu install? , but I tried this method only to get a drive that wouldn't boot. I didn't know how to get it to boot. Tried removing the original drive, but the "new" drive wouldn't boot after selecting it in the bios.

I am looking for a complete solution that backs up everything. This server has important data to me that I backup regularly, but I need to have a pretty quick way of restoring incase of a complete failure. Thanks in advance!

william
  • 39

3 Answers3

2

You should see this Comparison of backup tools

recommendations of backup tools and explanations

You could also take a drive image with clonezilla http://clonezilla.org/

Ringtail
  • 16,285
0

The problem I believe you are having is when you do a dd the new drive still does not have the same guid as the old drive. This will cause problems because your initrd images are built for the wrong drive.

Lvm is the answer to your needs. Install your system using lvm partitions and you can snapshot live partitions, back them up, put them on new drives, etc. Sorry if this answer seems a bit glib, but learning to use lvm is beyond the scope of a quick answer. However, the quick answer to your problem is to use lvm. Because you will be mounting the system from the initrd to an lvm partition, the lvm partition will always have the same guid.

-1

first time or once per month you can boot from a live distro and do: dd Source Target

then boot normally and setup a cron job every night to :

  1. mount Target
  2. rsync /var /boot /etc /usr /bin /sbin /lib* /root /opt and /home to Target

or everything exclude /sys /proc /dev /mnt /media /tmp

3. `umount` Target

if you want to keep versions of files instead of rsync use rdiff-backup

jet
  • 7,452