Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.


  Search this Thread
Old 10-14-2004, 08:29 AM   #1
LQ Newbie
Registered: Oct 2004
Posts: 1

Rep: Reputation: 0
can I backup a root disk and boot from the new backup disk

HI all I need to do a disastory recovery plan(I work on solaris and new to linux)
I have redhat linux 9 kernel 2.4.20-31.9 on an intel box p-4
I have 2 disks with the following partions
hda1====> /boot (/boot partition)
hda2=====> / (root partition)
hdb1====>/export/home(all home dirs and downloads etc)
I take backup over the network and can restore no problems!!!
I would like to backup /boot and /root to a different HDD in such a way that in case my HDD1 fails I should be able to bring up the system in no time by just inserting the HDD3(this is the disk which I backed up the / and /boot)
how should I proceed
(presently I have tape backups using dumps)
do let me know the best possile way to proceed
should I use dump commands,or copy, will be new disk boot up if I install it in place of the HDD1 after I remove it
Old 10-14-2004, 08:42 AM   #2
Senior Member
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
If you have an identical disk, with the same size, geometry information and partition table, then you can do this to take an image of the physical hda disk:
bzip2 < /dev/hda > hda.img.bz2
You will need to have all hda partitions unmounted (or mounted readonly) for this to give you a usable image.

You can then copy this onto another (unmounted and identical) disk, say hdc, using the command
bunzip2 < hda.img.bz2 > /dev/hdc
Provided that the new disk is inserted while configured as a master device, and your bootloader is actually on the disk (or at least unchanged), you can then boot off the new disk as if it were the old one.

With only Linux partitions, you can also do the same by copying the files (using cp -rp) and then installing the bootloader onto the new disk. This has the advantage that hda* can be mounted read/write during the process. However, this is more fiddly because you have to make sure that the boot-loader is installed to hdc but will try to boot from hda (because it will be hda when run).

A third option is to copy the files recursivly, and boot off a system rescue disk. Then just install the bootloader onto the new disk (see the grub or lilo documentation) and reboot.

Hope that helps,

—Robert J. Lee
Old 10-15-2004, 06:52 AM   #3
Senior Member
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
Make it easy on yourself:
Old 10-15-2004, 06:42 PM   #4
Senior Member
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
Originally posted by /bin/bash
Make it easy on yourself:
This will copy the partitions, and save space over using bzip2 directly. But it won't copy the boot record(s) (unless I've misread something on that page). So the copy disk won't be bootable.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Complete Hard-Disk & Root Filesystem Backup taylor_venable *BSD 1 11-18-2005 02:20 PM
Disk backup? rookworm Linux - Newbie 3 11-13-2005 05:38 PM
disk to disk backup for debian/Mempis on bootable cd-- advice loninappleton Linux - Software 3 05-27-2005 01:00 AM
What have I got already for disk backup in RedHat 8.0? SparceMatrix Linux - General 8 02-19-2003 03:13 AM
using linux boot disk to backup fat and vfat drives. DavidPhillips Linux - General 1 08-11-2001 04:07 PM > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 12:51 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration