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
  • Have you looked at bacula ? https://help.ubuntu.com/10.04/serverguide/C/bacula.html – Panther Feb 28 '12 at 05:52
  • 1
    What happened when you tried to boot from the 'new' drive? can you add the details to your question as it may be recoverable. – Mark Rooney Feb 28 '12 at 06:02
  • When I went to boot up on the drive that i just did dd command on, it just had the blinking cursor. So I did http://askubuntu.com/questions/69283/how-to-upgrade-my-hdd-and-keep-my-ubuntu-11-10-instalation this. When I did this it worked and I could boot from the new drive. That left me with a 500GB "New" Boot Drive and a 160GB "Old" Drive (not booted, but bootable). Question is how do i keep the 160GB "Old" not booted drive up to date with the "New" one and still keep it bootable. What commands do I need to run? What commands do I need to run for restoring? Thanks! – william Feb 28 '12 at 19:35

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,127
  • I see all of them, but none seem to do exactly what I want. Some are just data not apps settings etc, while others are gui or not easily repeatable on a nightly basis. For example, clonezilla, don't I have to shutdown the machine and boot over to clonezilla or have another machine to run the back up? That would give me not only downtime, but also the hassle of having to manually do this. Thanks for your help though! – william Feb 28 '12 at 19:39
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.

brad sanders
  • 271
  • 1
  • 4
-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,274
  • anyone care to comment the down votes? I'm a newbie and don't know why this method wouldn't work – Diego Ponciano Jan 07 '13 at 01:26
  • This answer would be improved by adding actual commands. The overview gives sufficient hints for those that can find the man pages so it's a good start. If I had a dollar for every time I edited my answer to improve it I could go buy a nice meal in a restaurant. – Elder Geek May 20 '14 at 15:35
  • Adding restoration process would also be useful. – Elder Geek May 20 '14 at 15:36