Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.hardware > #2733

Re: How to force copy retries until finally copied all due to a dying old HDD in Linux?

From ebenZEROONE@verizon.net (Hactar)
Newsgroups comp.os.linux.misc, comp.os.linux.help, comp.os.linux.setup, comp.os.linux.hardware
Subject Re: How to force copy retries until finally copied all due to a dying old HDD in Linux?
Date 2015-02-19 19:00 -0500
Organization A noiseless patient Spider
Message-ID <n1airb-lnv.ln1@pc.home> (permalink)
References <wsednYGSWe_iyTTJnZ2dnUU7-UednZ2d@earthlink.com> <La2dncl-EqmA6zTJnZ2dnUU7-NmdnZ2d@earthlink.com> <m8c0m6$p8f$2@dont-email.me> <BtednS378fbxBzTJnZ2dnUU7-bmdnZ2d@giganews.com>

Cross-posted to 4 groups.

Show all headers | View raw


In article <BtednS378fbxBzTJnZ2dnUU7-bmdnZ2d@giganews.com>,
Robert Heller  <heller@deepsoft.com> wrote:
> At Sun, 4 Jan 2015 18:27:18 +0000 (UTC) Rich <rich@example.invalid> wrote:
> 
> > 
> > In comp.os.linux.misc Ant <ant@zimage.comant> wrote:
> > > On 1/4/2015 7:23 AM, Robert Heller wrote:
> > 
> > > > dd can do that:
> > > >
> > > > dd ... conv=noerror
> > > >
> > > > man dd for full details.
> > > >
> > > > Basically, you do a raw DD of the 'bad' disk's file system (eg
> create a copy
> > > > of the file system either onto a new disk partition (of the proper
> size) or to
> > > > an image file.  Then you can mount the partition (or image via -o
> loop) and
> > > > then copy the files off.  Note: files with bad blocks will likely
> be 'broken'
> > > > and may not be usable, but you should be able to retrieve other files.
> > 
> > > This is more complex than I expected as a newbie. So, I can't copy files 
> > > directly like cp command? I do NOT need everything from the old dying 
> > > drive. I thought there was a way to do that to an existing HDD (don't 
> > > want to mess up my destination drive).
> > 
> > dd in="/old/drive/Mac OS X.dmg" out="/new/drive/that/is/not/broken/Mac
> OS X.dmg" conv=noerror
> > 
> > should work to "copy" a single file.  Change "in=" and "out=" files to
> > point to the ones you are trying to copy.
> > 
> > Note, that given the "errors" when reading the files, and the fact that
> > the example you gave is a mac dmg file, the result you get from the
> > "copy" process will likely be useless anyway.
> 
> Yes indeed. The 'best' option is to copy the whole file system (using dd
> conv=noerror) to a scratch disk or to a file image. Then go though the copy to
> pick out the files that are still usable. The OP seemed to want to copy
> everything still usable.  Doing dd on each file is very tedious, since dd does 
> not work with wildcards or multiple files.

No, but you can do something like this:

find "$srcdir" -type f | while read filename ; do
  dd if="$filename" of="$dest/$filename" conv=noerror
done

But I think you'd be better off using dd_rescue.

-- 
-eben    QebWenE01R@vTerYizUonI.nOetP    ebmanda.redirectme.net:81
LIBRA:  A big promotion is just around the corner for someone
much more talented than you.  Laughter is the very best medicine,
remember that when your appendix bursts next week.  -- Weird Al

Back to comp.os.linux.hardware | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How to force copy retries until finally copied all due to a dying old HDD in Linux? Ant <ant@zimage.comANT> - 2015-01-04 06:55 -0800
  Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? philo  <philo@privacy.net> - 2015-01-04 09:11 -0600
  Re: How to force copy retries until finally copied all due to a  dying old HDD in Linux? Robert Heller <heller@deepsoft.com> - 2015-01-04 09:23 -0600
    Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Ant <ant@zimage.comANT> - 2015-01-04 09:19 -0800
      Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Rich <rich@example.invalid> - 2015-01-04 18:27 +0000
        Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Robert Heller <heller@deepsoft.com> - 2015-01-04 13:54 -0600
          Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? ebenZEROONE@verizon.net (Hactar) - 2015-02-19 19:00 -0500
      Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Marc Haber <mh+usenetspam1118@zugschl.us> - 2015-01-05 14:10 +0100
  Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Lusotec <nomail@nomail.not> - 2015-01-04 15:39 +0000
    Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Ant <ant@zimage.comANT> - 2015-01-04 09:25 -0800
      Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Lusotec <nomail@nomail.not> - 2015-01-04 17:49 +0000
      Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? William Unruh <unruh@invalid.ca> - 2015-01-04 18:12 +0000
        Re: How to force copy retries until finally copied all due to a  dying old HDD in Linux? Robert Heller <heller@deepsoft.com> - 2015-01-04 12:26 -0600
      Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? The Natural Philosopher <tnp@invalid.invalid> - 2015-01-04 23:23 +0000
      Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Marc Haber <mh+usenetspam1118@zugschl.us> - 2015-01-05 14:11 +0100
  Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? William Unruh <unruh@invalid.ca> - 2015-01-04 18:07 +0000
    Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Ant <ant@zimage.comANT> - 2015-01-04 13:10 -0800
      Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? William Unruh <unruh@invalid.ca> - 2015-01-04 22:09 +0000
        Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Ant <ant@zimage.comANT> - 2015-01-04 15:25 -0800
        Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Chris Davies <chris-usenet@roaima.co.uk> - 2015-01-06 20:25 +0000
      Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Rich <rich@example.invalid> - 2015-01-04 22:12 +0000
        Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Ant <ant@zimage.comANT> - 2015-01-04 15:26 -0800
          Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Rich <rich@example.invalid> - 2015-01-05 00:21 +0000
            Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Ant <ant@zimage.comANT> - 2015-01-04 18:32 -0800
            Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Ant <ant@zimage.comANT> - 2015-01-04 19:36 -0800
              Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Robert Nichols <SEE_SIGNATURE@localhost.localdomain.invalid> - 2015-01-06 08:58 -0600
            Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Ant <ant@zimage.comANT> - 2015-01-09 18:33 -0800
              Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Robert Nichols <SEE_SIGNATURE@localhost.localdomain.invalid> - 2015-01-10 08:21 -0600
                Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Ant <ant@zimage.comANT> - 2015-01-10 07:47 -0800
                Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Robert Nichols <SEE_SIGNATURE@localhost.localdomain.invalid> - 2015-01-11 08:04 -0600
                Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Ant <ant@zimage.comANT> - 2015-01-11 10:14 -0800
                Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Ant <ant@zimage.comANT> - 2015-01-11 10:20 -0800
                Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Robert Nichols <SEE_SIGNATURE@localhost.localdomain.invalid> - 2015-01-11 19:23 -0600
                Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Ant <ant@zimage.comANT> - 2015-01-12 22:44 -0800
                Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Robert Nichols <SEE_SIGNATURE@localhost.localdomain.invalid> - 2015-01-13 08:39 -0600
                Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Ant <ant@zimage.comANT> - 2015-01-14 08:33 -0800
                Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? William Unruh <unruh@invalid.ca> - 2015-01-14 17:20 +0000
                Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Ant <ant@zimage.comANT> - 2015-01-15 00:46 -0800
                Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Ant <ant@zimage.comANT> - 2015-01-17 17:59 -0800
                Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Robert Nichols <SEE_SIGNATURE@localhost.localdomain.invalid> - 2015-01-18 08:45 -0600
                Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Ant <ant@zimage.comANT> - 2015-01-18 14:04 -0800
                Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? ebenZEROONE@verizon.net (Hactar) - 2015-02-19 22:15 -0500
                Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Ant <ant@zimage.comANT> - 2015-02-20 22:47 -0800
                Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Robert Nichols <SEE_SIGNATURE@localhost.localdomain.invalid> - 2015-01-14 23:05 -0600
                Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Ant <ant@zimage.comANT> - 2015-01-15 00:43 -0800
          Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Marc Haber <mh+usenetspam1118@zugschl.us> - 2015-01-05 14:13 +0100
  Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? andrew.williams@t-online.de - 2015-01-04 10:28 -0800
    Re: How to force copy retries until finally copied all due to a dying old HDD in Linux? Marc Haber <mh+usenetspam1118@zugschl.us> - 2015-01-05 14:15 +0100

csiph-web