Backing up with dd, and creating a file system on a new drive.
Ray Parrish
crp at cmc.net
Sat Dec 19 13:41:19 UTC 2009
Fred Roller wrote:
> Ray Parrish wrote:
>
>> Hello,
>>
>> I just got my new 500 GB drive, and am excited about being able to back
>> up my 160 GB old drive. Since I am new to the LInux camp, I need to know
>> how to set up the new drive, and how to use dd to image the 160 GB drive
>> to the 500 GB drive.
>>
>> After I do back up the small drive, and create partitions beyond what dd
>> writes there, will there be a problem with using dd to rewrite the back
>> up at a later date with the new partitions beyond the backup partitions?
>>
>> Can I use gparted to create an ntfs volume of the drive first, then use
>> dd to image the small one, or can I run dd on the unformatted drive
>> first to create the backup partitions?
>>
>> Thanks, Ray Parrish
>>
>>
>>
> Ray,
> Install and format your new 500 Gb hdd. Personally, if you are
> going to use it for backing up an external case may be worth the
> investment (.02). At any rate, to use dd to back up your 160 Gb drive
> do the following:
>
> Assumptions:
> - 160Gb drive is primary system drive.
> - 160Gb drive is /dev/sda
> - 500Gb drive is /dev/sdb1
> - we want to create a file /not/ move an image.
> - you know how to open a terminal
>
>
> 1. boot with a live CD
> 2. open terminal and become superuser:
>
> sudo su -
>
> 3. mount the 500Gb hdd
>
> mount /dev/sdb1 /mnt
>
> 4. insure 160Gb hdd is /not/ mounted:
>
> df -h |grep /dev/sda
>
> this should not return any results, if it does:
>
> umount [mount point of /dev/sda*]
>
> 5. Create .img backup
>
> dd if=/dev/sda of=/mnt/mybackup[date].img bs=512
>
> 6. take your spouse to dinner and a show, this will take a while, the
> best I have seen is 25Mb/sec, average has been 12-14Mb/sec, lows around
> 3Mb/sec. Assuming low average your backup should take about 3.7 hours
> (160000000000÷12000000÷60÷60=3.703703704). End result, you should have
> an .img file of the hard drive. Restoring is the same instructions
> except the dd command is reversed:
>
> dd if=/mnt/mybackup[date].img of=/dev/sda bs=512
>
> two points to conclude on:
> a. the .img is mountable so you can grab something if you need it.
> b. it is possible to pipe the dd command through tar for a smaller archive.
>
> I don't recall right off what those commands are; but, you should be
> able to google them.
>
Helo again,
Sorry I haven't gotten back to this thred until now, but I have been
pretty busy around here.
You were the person who got closest to what I wanted, but you are still
off the mark due to my not explaining myself well enough.
I do not want to make an .img file, I want to make a duplicate of my
dual boot 160 GB main drive, on the 500 GB so that I can swap places
with the drives, and run from the big one instead, in case the little
one goes dead.
I know dd can do this, as I have read a tutorial explaining how to do it
in the past, but I cannot find the same tutorial again.
Could you please help me out with this?
Thanks, Ray Parrish
--
The Future of Technology.
http://www.rayslinks.com/The%20Future%20of%20Technology.html
Ray's Links, a variety of links to usefull things, and articles by Ray.
http://www.rayslinks.com
Writings of "The" Schizophrenic, what it's like to be a schizo, and other
things, including my poetry.
http://www.writingsoftheschizophrenic.com
More information about the ubuntu-users
mailing list