Few questions abbout making backups
Hello to all,
I have already searched the forum and found useful information. However, to be 100% sure, I need more information. I need to make a backup (copy entire disk) of existing hard drive which is big about 10 GB. I have a spare one which is 40 GB in size, so it should fit. I need to be sure about the following: 1.When I add new drive in the computer on the separate IDE cable (secondary), that new drive will become hdb while existing drive (Master on primary IDE) is hda, right? 2. I will make exact copy in the following way: dd if=/dev/hda of=/dev/hdb This will copy entire hda to 10 GB of hdb, the rest will be free on hdb, right? 3. Does hdb (spare HD) needs to be partitioned in any way before executing dd command? I think not, but just to be sure. If someone can agree or disagree on this three question, I'd be very grateful. Thank you |
Quote:
You will have to use fdisk most likely to change your partitions after you do that. If Im wrong someone correct me, I havent used dd to copy a drive in a while. |
Sorry and the other 2 questions:
Quote:
Quote:
If you are putting it on a separate cable completely most likely it will become HDC. hda primary master hdb primary slave hdc secondary master hdd secondary slave but like I said it could be completely different. |
Micik,
Have you looked at this http://www.linuxquestions.org/questi...ommand-362506/ There is a specific section that deals with coping a smaller drive to a larger one. Just scroll down and you will find it. The new drive may be hdb, that depends on if the primary ide controler has 2 drives on it. If it does then it will most likely be hdc. There is one certin way you can tell. After you install it, boot on a live-cd like knoppix and the drives/partitions will show up on the desktop. Hope that helps |
Thank you,
I need to be careful about source and destination. I don't want to mix this and end up with two empty hard drives. So far, I have only one drive which is hda. I'm pretty much sure that this won't change after I add new hd on separate cable. Source will stay the same (hda). rbees, I have already read that thread. Just one question. Should this "Rejuvenate a hard drive To cure input/output errors experienced when using dd." be "Rejuvenate a hard driveTo cure input/output errors experienced when using HD."? |
Quote:
From a live cd you can look at the partitions to see what is on them to be sure you have the correct one. But if I remember right the partitions have to be unmounted before you run dd on them. |
Does it mean that I cannot just log on as root and type dd command?
I didn't find that piece of information. I thought to proceed as follows: 1. Open computer case and add new empty disk with IDE cable. 2. Turn ON computer, go to terminal, login as root 3. type dd command 4. after dd is finished, turn off computer and remove backup drive So, if I understood correctly, this will not work. What I need to do before typing dd command in terminal (command) window? Sorry because of these questions, but I need to be sure. Mistake may be very costly. The best possible approach would be to mount hda as a read only. syntax is mount -r, but don't know complete command. After logged on as root, should I type mount -r /hda or what? Thanks again |
Quote:
I am not sure about the partition being mounted though. I would think that the source partition would not matter because dd is only reading it. The destination partition may be a different matter. But like I said I am not sure it is only something I think I remember. I skimed the man page but didn't see that it said. A quick google search on 'dd mounted partition' gave me this http://www.inference.phy.cam.ac.uk/s...artitions.html but I have not really read it. If you don't change your fstab file to mount the new drive on boot after you install it, it won't be mounted anyway. Unless you mount it manually that is. What is the worst that can happen, you write a bunch of garbage to the drive and have to do it again. As long as you are carefull in your drive assignments that is. As long as you treat dd with a healthy amount of respect you should be ok. Use my advice at your own risk. |
Wouldn't it be easier to become root and just do
Code:
cd <source disk mount> If there isn't enough space on the source drive, why not just tar FROM the source while on the TARGET, then untar on target? |
I've already made backup by using dd command.
I used the following command: dd if=/dev/hda of=/dev/hdb bs=32256 Source drive was 10GB and destination 40GB. It took about one hour and ended up with error message that there is no space on the drive (which makes no sense). But nevertheless I tested backuped HDD and it seems that working just fine. Probably, the problem was in the fact that I didn't unmout /hda2, but not really sure. I didn't know how to remount drive as read only. I'll test more tomorrow and see if there are any problems... Thanks for the help |
All times are GMT -5. The time now is 06:27 PM. |