Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-21-2006, 05:12 PM
|
#1
|
Member
Registered: Oct 2004
Location: Belgium / Antwerp
Distribution: Debian
Posts: 287
Rep:
|
howto backup & recover many pc's
Hi,
I'm working in a shop with a lot of different computers. We also repair them ourselves (software). I'm wanting to make a external harddisk stuffed with an image of the harddisc of every computer ever sold at the place where I work to make it very easy to recover it when it crashes (since we only sell windows pc's it happens a lot).
I was thinking of using a knoppix-cd to boot it up, attach the hd and then use dd to do it. The only problem is that when you use dd, it works perfectly but takes a lot of time and uses too much space (I'm not going to buy a 500TB hd). Then I thought to compress the dd-image but it takes WAY too long time to compress a 120GB image.
I'm looking for the easiest solution let's say something like this
to make an image:
backup /dev/hda /dev/sda1/acer/aspire/1220VT/winxp.img
to restore it:
restore /dev/sda1/acer/aspire/1220VT/winxp.img /dev/hda
As you can see, it must be something very very straitforward and easy to use. The only time I need to spend is to boot it up, give 1 command and leave the computer for an hour and it's ready.
Thx
Wannes
|
|
|
01-21-2006, 05:47 PM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
i think you're pretty much there already really, but you just need to combine both the dd and the compression in one go. dd is pure io, compression is pure cpu, so there should be minimal impact of compressing a dd stream rather than writing it (as an interesting aside, the main reason for the linux kernel image being compressed is *i think* that it's actually quicker to read the small file and decompress it, than to read the uncompressed file from disk.. weird but true). Anyway.... so use dd, but rather than running just an if= and of= try somethign like "dd if=/dev/hda | bzip2 > /mnt/images/backup.img.bz2" it should be almost as quick as not compressing it at all (make sure the good stuff is on already like dma). likewise for decompression "bzip -dc /mnt/images/backup.img.bz2 | dd of=/dev/hda"
|
|
|
01-21-2006, 06:25 PM
|
#3
|
Member
Registered: Oct 2004
Location: Belgium / Antwerp
Distribution: Debian
Posts: 287
Original Poster
Rep:
|
Wow, Extremely helpful (notice capital).
Trying it at the very moment on an 8GB old hd, and an external 40GB laptop hd.
How do I turn on, or how can I see that dma is turned on? is it via mounting? no idea.
Is there also some kind of possibility to combine it with a command that automatically writes a file in the same directory with the time it took to make the image? So when a customer comes I can tell him:"Well sir, you can come back in 54m:42s" I've been looking for something like that but the explanation was not very clear to me. Many many thanks already Wannes
Last edited by bucovaina78; 01-21-2006 at 06:27 PM.
|
|
|
01-21-2006, 06:46 PM
|
#4
|
Senior Member
Registered: Nov 2004
Distribution: Mint, MX, antiX, SystemRescue
Posts: 2,337
|
Quote:
Originally Posted by wannessmet
I'm working in a shop with a lot of different computers. We also repair them ourselves (software). I'm wanting to make a external harddisk stuffed with an image of the harddisc of every computer ever sold at the place where I work to make it very easy to recover it when it crashes (since we only sell windows pc's it happens a lot).
|
I hope you're not talking about imaging everybody's computer that comes through your shop for repair. That wouldn't be cool. Even if you're only planning to image new sales containing no customer specific data, then you might need one whopper big external harddisk to store the different images on! Unless you're selling commodity computers all with the same hardware and software installed. No significant customer-requested variations allowed. Also, since you're dealing with Windows boxes I'd propose a Windows solution rather than Linux. Norton Ghost or similar. Save the images off to DVD's or CD's instead of trying to find yourself a ridiculously huge external harddrive. I don't consider harddrives to be archival storage. CD's or DVD's either, for that matter. How long are you planning on keeping these images?
|
|
|
01-21-2006, 07:23 PM
|
#5
|
Member
Registered: Oct 2004
Location: Belgium / Antwerp
Distribution: Debian
Posts: 287
Original Poster
Rep:
|
We are planning to make images of every model of computer. Now we have to send the computer in repair to reinstall it, takes 3 till 4 weeks. If we have an image of the model of his computer we can reinstall it in 3 till 4 hours (if we can start immediately)
Why use Knoppix? I'm used to Knoppix and wherever I boot I KNOW everything will be the same. And I'm not touching the hd of the source computer. and I can also recover Mac computers (if I have a ppc knoppix disc) in exactly the same way I'm used to when I am recovering pc.
BTW what fs should I use? NTFS->no way, ext3->not readable for windows, FAT32->getting rather old any other good for big files and fast reading?, I'm planning to get a 320GB or 500GB harddisc or maybe DVD's depending on the size of the images
Wannes
|
|
|
01-21-2006, 08:50 PM
|
#6
|
Senior Member
Registered: Nov 2004
Distribution: Mint, MX, antiX, SystemRescue
Posts: 2,337
|
Quote:
Originally Posted by wannessmet
BTW what fs should I use? NTFS->no way, ext3->not readable for windows, FAT32->getting rather old any other good for big files and fast reading?
|
If you're talking about using dd to create images, it matters not whether Windows can read the data or not. You will be using Linux to read and do the restores. Maybe there's some Window's equivalent of dd, but I'm unfamiliar with it if such a thing exists.
Any journelling Linux filesystem is probably just fine for your use. EXT3, Reiser, XFS, JFS. Reiser has a reputation for being faster with lots of small files, XFS and JFS for small numbers of large files. EXT3 has been around for a while and is well shaken down. But for your stated application I don't think minor differences in performance really come into play. If push comes to shove and you have an emergency need to read from Windows, there are things available that allow it to read EXT2/3. I haven't heard of these for JFS, XFS, or Reiser, but that doesn't mean they don't exist. I wouldn't use Windows to write any Linux filesystem, nor Linux to write any Windows filesystem (except FAT32). You certainly can do exactly this, but I'm too conservative to trust these kind of operations.
I also believe FAT32 is limited to files no larger than 4Gb. That may represent a limitation for your images depending on just how big they are. I can fit a minimal W2k image on a CDROM (if compressed), but that's with hardly more than the bare OS installed. FAT32 is not a journelling filesystem either. NTFS is, but I wouldn't even consider NTFS for this application when using Linux.
|
|
|
01-22-2006, 02:30 AM
|
#7
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
personally i'd want something more suitable than knoppix. what about something like DamnSmall booting from a memory stick? Having it on a writable media means that you can easily add scripts to the system to streamline things a lot easier. it'd even be childsplay to make some automated system with a noddy little menu to either restore or save images etc... sounds like a fun little project... almost.
There are other direcions you could head in too... Why use an external hard drive? would be a lot slicker to use a network server, although there would be a fair load on it. BUT if you do then you can save scripts on the server, run them automatically over NFS and you're not moving around a single drive that would be pretty critical in your daily operation. instead a raid mirror sits stationary on an NFS server and is rock solid and reliable. You could also get daft and start looking at using just a single boot disk to boot to the server itself, so not need any live cd at all, without messing with memory sticks either. NFS booting isn't too hard...
|
|
|
All times are GMT -5. The time now is 05:32 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|