LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 10-14-2004, 08:29 AM   #1
linuxbkp
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
HDD1
hda1====> /boot (/boot partition)
hda2=====> / (root partition)
HDD2
hdb1====>/export/home(all home dirs and downloads etc)
I take backup over the network and can restore no problems!!!
My QUESTION :-
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
regards
gmb
 
Old 10-14-2004, 08:42 AM   #2
rjlee
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:
Code:
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
Code:
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
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

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

Rep: Reputation: 76
Quote:
Originally posted by /bin/bash
Make it easy on yourself: http://www.partimage.org/
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.
 
  


Reply



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

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 01:46 PM.

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