[dundee] Image hard drive to file

Lee Hughes toxicnaan at yahoo.co.uk
Mon Feb 25 00:38:25 GMT 2008


just because unix lets you do something like this, doesn't mean it's either correct or sensible. if you want to do online backup like this PROPERLY, look at 
lvm2, which can do hot backup using snapshot files..

okay,,, dd while mounted is bad, and I'd rather you not post it here in case
people on this list actually take that as good advice, which it isn't.

unmount, or use a logical volume manager...end of story.



Robert McWilliam <rmcw at allmail.net> wrote: On Sun, 24 Feb 2008 23:39:58 +0000, "Andrew Clayton"
 said:
> On Sun, 24 Feb 2008 22:55:52 +0000 (GMT), Lee Hughes wrote:
> 
> > you cant image a filesystem while it's mounted.
> > 
> > either unmount it, or boot from a live disc, and do what you will to
> > it from there!
> > 
> 
> Works fine on a mounted fs.

Yes, being mounted doesn't actually cause problems, but being in use
will. If the partition you are imaging changes while you are taking the
image then you will get a corrupt image. dd basically copies data from a
source file to a destination file in chunks, starting at the beginning
and working its way through. Changes to a file system have to happen in
a couple of places to happen properly, e.g. to create a file you have to
put the data somewhere on the disk and update the file table to say
where the file is and how big it is and possibly some other stuff. If
that happens while dd is taking an image of the file system then the
image might only get some of the changes as the others are to areas
where dd has already made a copy of the old data. 

To the OP: You'll want to ensure the file system isn't in use
(unmounting is the easiest way to be sure) and then run something along
the lines of:

dd if=/dev/
 of=/path/to/put/image

Robert
________________________________________________________
Robert McWilliam     rmcw at allmail.net    www.ormiret.com

Everything should be made as simple as possible - but no simpler.
 -- Albert Einstein


_______________________________________________
dundee GNU/Linux Users Group mailing list
dundee at lists.lug.org.uk  http://dundee.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/dundee
Chat on IRC, #tlug on dundee.lug.org.uk



       
---------------------------------
Sent from Yahoo! Mail.
A Smarter Inbox.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.lug.org.uk/pipermail/dundee/attachments/20080225/47a2704b/attachment.html


More information about the dundee mailing list