LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-07-2004, 08:18 PM   #1
sross
Member
 
Registered: Jun 2004
Posts: 34

Rep: Reputation: 15
Question best way to ghost linux?


Ok, I have my linux installed and mostly how I like it. I would like to backup the entire thing so if say my hard drive dies, I can put in another drive, then boot to a backup and restore. What is the best way to do this? The thought of losing everything after putting so much work into it would be a nightmare..
 
Old 06-07-2004, 09:04 PM   #2
Covel
Member
 
Registered: Oct 2003
Location: Portugal
Distribution: Gentoo
Posts: 116

Rep: Reputation: 16
If you have 2 hard drives you can try RAID 1. I personally don't do it because:

1- I don't have 2 HDs
2- If I had 2 HDs I would probably like to use them both for storage


But if I had the money to spend on HD, I probably would do RAID 1 on two big HDs or maybe RAID 3 with more and possibly smaller HDs.

(this is only one suggestion. not necessarily the best)
 
Old 06-07-2004, 09:33 PM   #3
sross
Member
 
Registered: Jun 2004
Posts: 34

Original Poster
Rep: Reputation: 15
na, don't have raid options. I'm looking to just dump the whole show onto a bootable dvd or something like that, thanks tho
 
Old 06-07-2004, 09:44 PM   #4
cprogrck
Member
 
Registered: May 2004
Posts: 91

Rep: Reputation: 15
hmmm that's a hard question to answer. Try making a hard drive image or somthing. I don't know what app you use, but I remember reading somthing a few years ago about making hardrive images. I forget what size they are but I think there's an app that lets you make several discs. You do realize that with today's huge hardrives it could take many cds or dvd to total back up a hardrive
 
Old 06-07-2004, 09:49 PM   #5
sross
Member
 
Registered: Jun 2004
Posts: 34

Original Poster
Rep: Reputation: 15
yeah thats why I want to do this now without much data installed, so my overall backup would only be a few gig.
 
Old 06-07-2004, 10:16 PM   #6
heema
Senior Member
 
Registered: Sep 2003
Location: Egypt
Distribution: Arch
Posts: 1,528

Rep: Reputation: 46
The program that ur looking for is called Partimage

" Description: Partition Image is a Linux/UNIX utility which saves partitions in many formats (see below) to an image file. The image file can be compressed in the GZIP/BZIP2 formats to save disk space, and split into multiple files to be copied on removable floppies (ZIP for example), ... Partitions can be saved across the network since version 0.6.0.
"

http://www.partimage.org/
 
Old 06-08-2004, 01:27 AM   #7
crazyeddie740
Member
 
Registered: May 2004
Location: Sedalia, MO
Distribution: Debian, Mandrake
Posts: 50

Rep: Reputation: 15
You can also use the command line dd utillity. It comes with most distros. Check it out in the LQwiki. The LQwiki entry is a bit sparse, but I'll add to it when I'm more awake. You can pipe the results through gzip or whatever, make a multiple disc compressed archive, but I'd have to poke around in man pages to tell you how to do the multiple disc part.
 
Old 06-08-2004, 01:53 AM   #8
overlord73
Member
 
Registered: Apr 2004
Location: ..where no life dwells..
Distribution: RH,FC/SuSE/Debian/HPUX/OSX
Posts: 511

Rep: Reputation: 30
thatīs it crazyeddie!

the securest way is to use dd. with dd you can clone EVERYTHING!

direct cloning from harddisk A to harddisk B:
[linux]# dd if=/dev/hda of=/dev/hdb

or to a file with checking that both are identical:

[linux]# md5sum /dev/hda >hash.txt
[linux]# dd if=/dev/hda of=/backup/filename
[linux]# md5sum /dev/hda >>hash.txt
[linux]# md5sum /backup/filename >>hash.txt

further iīve made good experiences with ACRONIS TrueImage. Itīs a very good and quick program to clone disks or partitions.
 
Old 06-29-2004, 02:01 PM   #9
CuBiC
LQ Newbie
 
Registered: Jun 2004
Posts: 7

Rep: Reputation: 0
Would this work if the two harddrives were unequal?
I mean, I'm planning on movng the entire content of a 30 gig drive, over to a 200 gig one, so I was just kinda wondering if that would pose a problem with the dd command.
 
Old 06-29-2004, 02:08 PM   #10
crazyeddie740
Member
 
Registered: May 2004
Location: Sedalia, MO
Distribution: Debian, Mandrake
Posts: 50

Rep: Reputation: 15
If you used the dd command, you'd be left with a 30 gig partition on a 200 GB drive - I think. I've read of a "resize2fs" tool that could resize it upwards nondestructively (in theory! backup *first*!!!) (and this tool is destructive when resizing downwards) but I've never used it or seen it used.
 
Old 06-29-2004, 02:20 PM   #11
CuBiC
LQ Newbie
 
Registered: Jun 2004
Posts: 7

Rep: Reputation: 0
Quote:
Originally posted by crazyeddie740
If you used the dd command, you'd be left with a 30 gig partition on a 200 GB drive - I think. I've read of a "resize2fs" tool that could resize it upwards nondestructively (in theory! backup *first*!!!) (and this tool is destructive when resizing downwards) but I've never used it or seen it used.
Ah, I got the resizing covered, at least I THINK I do. I have a win98 partition there, which I run a program called "Partition Magic" from, I've used it one time earlier to resize my linux partitions and it worked mostly perfect.
So, the entire problem I have is, I want four partitions(one win98 partition, one ext2 and an extended partition containing one swap partition and another ext2) over to the 200 gig drive, with the bootrecord(I have BootMagic running on the MBR and lilo running on the root ext2 drive) and all, since the 30gig is to be used elsewhere. So basically, I want the 200 gig to be a mirror image of the 30 gig after the operation, then I'll just add/resize partitions as I see fit.
 
Old 06-29-2004, 07:17 PM   #12
CuBiC
LQ Newbie
 
Registered: Jun 2004
Posts: 7

Rep: Reputation: 0
hmm....
I just got a "recomendation" from someone that I use "cp -a /dev/hda /dev/hdb"
Is this a good thing to do? If I have the proper bootdisks and such, that is.(Which I do have)
 
Old 06-30-2004, 01:05 AM   #13
Kroenecker
Member
 
Registered: May 2003
Location: The States
Distribution: Gentoo
Posts: 245

Rep: Reputation: 30
Well, I think that cp -a /dev/hda /dev/hdb should be just fine. The -a option preserves permissions as well as to do some other useful stuff for you. As far as needing boot disks is concerned...well this isnt voodoo magic. You are using the copy command. At the very worst your copy doesnt turn out well. My recommendation is to perform the copy and then (if you are comfortable with this) turn your computer off, unplug the power, and put the hdb drive in the hda ide slot. Effectively you have just replaced the hda with the hdb drive. Then try turning on your computer. If everything runs smoothly, you have successfully copied everything down to the MBR. (I hope.) As I havent done this myself, I cant guarantee.
 
Old 06-30-2004, 06:09 AM   #14
Goala
Member
 
Registered: May 2004
Location: Merida (Spain)
Distribution: Debian
Posts: 89

Rep: Reputation: 15
I'd suggest you not to use cp -a because it doesn't keep symbolic links, use tar instead.
 
Old 06-30-2004, 07:14 AM   #15
Lazarus
Member
 
Registered: Dec 2001
Location: Kent in UK
Distribution: Fedora 2
Posts: 170

Rep: Reputation: 30
I have always used a simple approach. I have a second HD and dump my root partition thus:-
cd /
tar -cvlzf /disk2/mydump.taz .
must be done as root.
I also copy these dumps to dvd from time to time.
To restore the system I boot up from a cd. There are several around to choose from.
I then remake a file system in my case:-
mkreiserfs /dev/hda2
then
mount -t reiserfs /dev/hda2 /mnt
mount -t reiserfs /dev/hdb1 /work
cd /mnt
tar -zxvf /work/mydump.taz
That should give the picture of how I do things here. I use RH 9.0 on reiserfs. I changed to reiserfs by dumping as described above changing the fs to reiser and then restoreing.
Hope this gives you some ideas
 
  


Reply


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
Ghost software : Linux Ghost server NL-Stitch Linux - Newbie 18 02-02-2007 11:55 PM
ghost linux drive ? xaeniac Linux - General 3 05-30-2005 07:36 PM
Ghost and Linux robbow52 Linux - General 3 07-31-2004 02:24 AM
Linux and Ghost robbow52 Debian 1 07-30-2004 09:46 PM
Can i ghost Linux? Goll Linux - Newbie 20 12-17-2003 03:22 PM


All times are GMT -5. The time now is 02:54 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration