jwz mentions PSA: Backups a backup system that's fairly clever. Your backup method is to essentially restore to the replacement drive. This seems to work simply on OSX. What all do I need to do to adopt this guide to Ubuntu?
|
feedback
|
|
Partition the two external drives the same way as your system drive, and rsync all your partitions as well as dding the boot sector (the first sector of the drive) from the system drive to the external drives. Ugly, but serviceable, if you get your partitioning right (big if). Also take a look at more advanced "system snapshot" systems like mondo rescue, which kinda take care of that sort of trickery for you. | |||
feedback
|
|
I see a lot of people out there recommending rsync like this. It really should not be recommended. Rsync is great for backing up data, but its not really designed to back up a live operating system, and the fact that it can is only because otherwise it is such a great tool. In Ubuntu, you will have problems when your using multiple partitions because that rsync command only does 1 filesystem. Also, ubuntu sometimes uses UUIDs of disk drives, so that will throw it off if your booting a different drive. You can do some tests with rsync and make it work. However, I'd suggest using tools that were designed for that. Personally, I keep written install instructions and scripts to automate install stuff, then I don't have to back my operating systems. For linux, I think ultimately that is the best way because I can run many linux distros and all I have is a few text files I run to download the packages and set things up etc, plus lots of other benefits like I'm able to access and maintain my knowledge of setting up the OS. For actual backup like your question asks, it is hard to find good answers because there are lots of solutions and no best one for all circumstances. I don't know the best point and click method your after. LVM2 is designed for live snapshots using any number of LVM tools. Ubuntu supports it in its installer and it is easy to setup. If your not already on LVM, its obviously not super simple to move to it. Here are some links: http://tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html http://www.howtoforge.com/linux_lvm_snapshots There is also software that tries to manage all your backup stuff like Bakula or Mondo Rescue. A good simple one that seems to have been forgotten is dump. I've installed a small linux small linux distro on a < 500 mb partition, set a cron job to reboot into it and do incremental backups of linux OS partitions, then reboot back to the original distro. http://linux.die.net/man/8/dump. Google will find you some more answers. Some OCD tendency compels me to point out that guys rsync command has a redundant flag in it. | |||||
feedback
|
|
For Ubuntu I recommend using sbackup, the whole "rsyncing a live bootable disk" just doesn't function very well in Linux. If the UUID's are different on the two drives (9/10 they will be) then you can't simply boot off the backup disk to get back up and running, you'll need to boot off your Ubuntu CD and edit /etc/fstab on the replacement drive first. If the UUIDs are the same, then you're going to run into problems while trying to have the two mounted simultaneously. There are differences in the Mac filesystem that make this kind of trickery possible, I've never heard of doing this method via rsync but it's very common in the OSX world to backup by simply creating a disk image of your live boot volume, which you can later restore. Functionality to restore such images is provided on the OSX install CD. The quickest solution for Ubuntu is sbackup and then just reinstalling Ubuntu (from the Ubuntu 'live CD' it's effectively the same as restoring a disk image, after which you restore your previous package selection, config and data from the sbackup archive. Fairly simple and I suspect you could write a howto that takes a new user through the complete steps of backup/install/restore without much problem. | |||||||||
feedback
|
|
If you are clever, and you plan in advance, you can use LVM to accomplish this for you. Say you have your system on a drive that uses LVM; in fact, the entire system is on an LVM volume somewhere. With your second hard drive in an external case, attach the drive to your system, get LVM to recognize the drive, and then use LVM's mirror facility to copy the drive in place. Once a complete copy is finished, break the mirror. You will now have an exact snapshot in time (because the mirror also records any changes that take place during the copy process). The only thing you need now is to make it bootable. If you're using GRUB, you can do this from your existing system. If you want to be really clever, write up this process as a script, and run the script on a regular basis. All you have to do is make sure the external drive is attached when it runs. | |||
|
feedback
|
|
Not sure if I am understanding your question correctly: If you are wanting to backup your linux machine to create bootable restore cd's, then have a look at mondo It's a clever backup program that backs up your kernel and all required hardware drivers in such a way to be able to snapshot the entire server to .iso images, which can then be burned to CD/DVD. Then if a restore is needed, just pop in the first CD, power-on, and select a restore option. | |||
|
feedback
|
|
I don't have an exact step-by-step recipe for you, but I suspect I would start building a system like this. I am assuming you are an Ubuntu user based on your icon, the tags.
I haven't tested this and worked out the fine details, but I am pretty sure if you rsync and don't overwrite the /etc/fstab or /boot, then the system should still boot and be able to mount the root filesystem. The /root/rsync-exclude file will keep you from including tmp files and junk you don't need to backup, and it will keep you from overwriting your /boot directory and fstab. Like I said, I haven't tested I believe my basic plan is sound. I agree with other posters in believing that this isn't a great method for backing up your system. If you have any database applications like mysql, you will want to make sure you back them up separately. /root/rsync-to-portadrive
/root/rsync-exclude
| |||
|
feedback
|
|
You didn't mention the frequency and the constraints. For desktops, I used a simple nightly cron script that did a dumb but complete duplication of the drive based on something like :
Advantages
Disadvantages
A more chirugical solution does exist if your system allows "snapshotting" such as LVM snapshots as other pointed out. I proposed mine since the backup/recovery part is not as simple as your question seemed to imply. | |||
|
feedback
|
|
You can't make a safe copy of a live system. The best bet is to make a boot disk, say a live CD, modified to run a script that does the back in one of the ways described above. You could use these instructions to do the clone with ddrescue. | |||
feedback
|