Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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!

share|improve this question
    
Have you looked at bacula ? help.ubuntu.com/10.04/serverguide/C/bacula.html –  bodhi.zazen Feb 28 '12 at 5:52
    
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 6: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 askubuntu.com/questions/69283/… 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
add comment

3 Answers

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/

share|improve this answer
    
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
add comment

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.

share|improve this answer
add comment

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

share|improve this answer
    
anyone care to comment the down votes? I'm a newbie and don't know why this method wouldn't work –  Diego Ponciano Jan 7 '13 at 1:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.