Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 466
  • Last Modified:

How to create image of hard drive using dd directly to cd or dvd

I am wanting to make a complete backup image using dd of my hard drive, however, since it is the only hard drive in my system, i can't write the image to itself.  I do, however, have a dvd burner on this system.  Is it possible to use dd to image the entire hard drive directly to a series of either cds or dvds (i know it would be a stack of them, but i think it's my only option).  Also, what compression options are available that might help reduce the size of the output?  Are there other utilities that would do the same, but in a better way than dd?

Thanks for your help!!

ps:  This is on Slackware Linux
0
sah18
Asked:
sah18
3 Solutions
 
pjedmondCommented:
First, in order to carry out the backup, you need to mount the drive read only.....which is a problem if you are running from it!...Therefore, you need a live CD:

http://www.frozentech.com/content/livecd.php

Knoppix (or any of the other data recovery ones) will do the job nicely. Provided you can run the Live CD and burn to an optical media, or save to an external network system, or drive, then you can carry out the backup.

To make an exact copy using dd:

dd if=/dev/hda1 of=/mnt/externaldrive

A number of other ways of doing this to a remote server (over ssh), or a remote share are detailed here:

http://www.okmoore.com/imagedrive.html

(   (()
(`-' _\
 ''  ''

0
 
sah18Author Commented:
Thanks very much for your help.  Just a couple more questions... The command you gave will work to burn directly to a cd?  Also, don't I need something to tell it to breakup the image into pieces only as large as the media I'm writing to (or will this happen automatically)?  I do actually have two optical drives on this system -- a cd-rw drive and a dvd+rw drive, so I would be able to boot to a live cd first, then burn the image to the second drive.
0
 
pjedmondCommented:
>The command you gave will work to burn directly to a cd?

No - You need to use something like cdroast or cdtools to burn to the CD (once you've broken the image into suitable bits).

>Also, don't I need something to tell it to breakup the image into pieces only as large as the media I'm writing to (or will this happen automatically)?

You probably want to use tar to compress the file and use the k option to force it to break the file into specified sized bits.

man tar

for more details

>I do actually have two optical drives on this system -- a cd-rw drive and a dvd+rw drive, so I would be able to boot to a live cd first, then burn the image to the second drive.

Yes you could, but you'd need some space somewhere to store the image/break it up/create the burn image. Either on the network, or on a second drive installed especially for this.

(   (()
(`-' _\
 ''  ''
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
sah18Author Commented:
So, you're saying it's not possible to image directly to a cd or dvd on linux?  You can do this in windows, that why I was hoping linux could do it as well.
0
 
slyongCommented:
> Are there other utilities that would do the same, but in a better way than dd?
Try Mondo Rescue.. http://www.mondorescue.org/.  It can do back up to CD/DVD too.

Novell also has a script to help you to write to a DVD-R/W: http://www.novell.com/coolsolutions/tools/15505.html simpler but not doing as much as Mondo Rescue
0
 
nociSoftware EngineerCommented:
dd will only write directly to a dvd-ram, all other need some filesystem that is cd/dvd aware.
but you can use a tool like growisofs, (commandline) or k3b (graphic version)
to burn data to a dvd-rw.
0
 
pjedmondCommented:
>So, you're saying it's not possible to image directly to a cd or dvd on linux?  You can do this in windows

AFAIK you can only do that in windows if you have enough space on the operating system drive to create the image prior to burning it to the CD. The same applies to Linux. If you'd like to do the copying 1 file at a time, then memory is probably sufficient to hold each file before it is burnt. Indeed you could do the same with an iso image if you had sufficient memory available, but very few systems have over 4GB of memory in order to enable them to do DVDs on the fly!

Even Mondo requires 800MB of disc space free for preparing the image for burning to CD. For 'streaming to tape, you don't need this because the stream of data is passed continuously to the tape.

(   (()
(`-' _\
 ''  ''
0
 
sah18Author Commented:
thanks to all for your suggestions!  they've been helpful!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now