Author Topic: Skip copying corrupted files?  (Read 979 times)

Offline Vorteggs

  • Hero Member
  • *****
  • Posts: 2405
Skip copying corrupted files?
« on: November 12, 2012, 06:18:13 AM »
I have a semi-died hard disk with a lot of data on it.

System can see it if I enable the safe configuration in BIOS (contradictory to optimized configuration).

When I try to copy multiple files from there to another disk copying freezes, I suppose, on files where the physical damage of the disk shows itself so the file can't be read.
But some files are copied and are good.

So I want to save the good files but copying freezes.
Yes if I copy them one by one I'll do the job. But there is a bunch of files.

I tried with Konqueror, Dolphin and Krusader.
Didn't find there an option to skip the copying of files that can't be copied.

Tried the cp command and it freezes too after 10-20 files.
Read the man page but didn't find the option that I need either.

Does anyone of you knows of a program or command suitable for this task?

Thanks in addvance :)

« Last Edit: November 12, 2012, 06:25:27 AM by Vorteggs »

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10621
  • MLUs Forever!
Re: Skip copying corrupted files?
« Reply #1 on: November 12, 2012, 07:22:45 AM »
I haven't had the problem so have not figured it out ......  but I would be looking to rsync, maybe piped from the find command .....  or maybe dd, dcfldd, ddrescue or dd_rescue to see if they might suit.

Interesting problem  :D
« Last Edit: November 12, 2012, 08:00:29 AM by Just17 »
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline T6

  • Super Villain
  • ******
  • Posts: 19077
  • xmas is comming!
Re: Skip copying corrupted files?
« Reply #2 on: November 12, 2012, 07:27:03 AM »
in this case i would use photorec but you will loose the names of the files

there is other windows tools(can't remember names now, most of them found in ultraboot cd windows or hirens) that could help but most of them try to rebuild hard disk after a checkdisk so you need to run chkdsk from a cli on windows(i never used fsck) if the tool doesn't do it first or skip the damaged sectors but we are talking of a long task, 5 to 10 hours in some cases

you could try to copy one by one if the os hangs when it reaches damaged sectors or try to copy entire folders

that will take lots of time i'm sure so be patient, after all the recovery tools will surely loose the damaged files so it will make the same as you copying files one by one
"If you wish to make an apple pie from scratch, you must first invent the universe."

Carl Sagan

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10621
  • MLUs Forever!
Re: Skip copying corrupted files?
« Reply #3 on: November 12, 2012, 07:30:25 AM »
Quote
in this case i would use photorec but you will loose the names of the files

As the good files are accessible in a file manager this would not be the way to go.

The question is how to copy good files while ignoring corrupted files .......
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline aguila

  • Hero Member
  • *****
  • Posts: 1210
  • soaring high = no Windows here :-D
Re: Skip copying corrupted files?
« Reply #4 on: November 12, 2012, 07:43:01 AM »
LuckyBackup uses rsync. I'm using LuckyBackup but actually I'm not sure if you can skip the bad files with it. Worth a look anyway.
All that is is good. PCLinuxOS is.

Thinkpad X61 Tablet, Core2Duo 1.66 MHz, 4 GB Ram, Intel onboard Graphics, Plextor PX-256M3 256 GB SSD; Thinkpad R61i, Core2Duo 1.66 MHz, 2 GB Ram, Intel onboard graphics, 120 GB HDD

Offline T6

  • Super Villain
  • ******
  • Posts: 19077
  • xmas is comming!
Re: Skip copying corrupted files?
« Reply #5 on: November 12, 2012, 07:46:33 AM »
Quote
in this case i would use photorec but you will loose the names of the files

As the good files are accessible in a file manager this would not be the way to go.

The question is how to copy good files while ignoring corrupted files .......

yes but when you know that you can't save everything because there is big problems in the disc, names of files are the minor problem here
"If you wish to make an apple pie from scratch, you must first invent the universe."

Carl Sagan

Online agmg

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1897
  • Certified Windows Hater
Re: Skip copying corrupted files?
« Reply #6 on: November 12, 2012, 07:49:43 AM »
Have you tried the "cp" command with the -verbose switch? I think it will let you skip bad files.

But I guess "ddrescue" might help you more with what you are trying to do:

http://www.gnu.org/software/ddrescue/ddrescue.html
For the whole world, you are someone.
For someone, you are the whole world.

Offline Vorteggs

  • Hero Member
  • *****
  • Posts: 2405
Re: Skip copying corrupted files?
« Reply #7 on: November 12, 2012, 08:00:38 AM »
Thanks people!
I'll try your suggestions at weekend I think.
 :)

Offline 7272andy

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1627
  • UK MLU
Re: Skip copying corrupted files?
« Reply #8 on: November 13, 2012, 01:03:36 AM »
Some years ago I bought Spinrite from Gibson research. It's not cheap but so far its never failed to recover data/return access to a dying disk

Regards


Bare Metal 1         Bare Metal 2
Intel Celeron 420M   Intel i5 540M
2GB Ram              4GB Ram
Intel 943GM          Radeon HD 5650 PCI Express
RT2573               RT2790
32bit KDE            32&64bit KDE

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10621
  • MLUs Forever!
Re: Skip copying corrupted files?
« Reply #9 on: November 13, 2012, 04:51:24 AM »
Some years ago I bought Spinrite from Gibson research. It's not cheap but so far its never failed to recover data/return access to a dying disk

Regards

I bought Spinrite at about Ver 6 or so .......  used it on a couple of failing disks and it killed them.

Never used it again.
MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline 7272andy

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1627
  • UK MLU
Re: Skip copying corrupted files?
« Reply #10 on: November 13, 2012, 10:57:45 AM »
Just checked, mine is V6 too


Bare Metal 1         Bare Metal 2
Intel Celeron 420M   Intel i5 540M
2GB Ram              4GB Ram
Intel 943GM          Radeon HD 5650 PCI Express
RT2573               RT2790
32bit KDE            32&64bit KDE

Offline dcwbis

  • Full Member
  • ***
  • Posts: 167
Re: Skip copying corrupted files?
« Reply #11 on: November 13, 2012, 11:47:37 AM »
I have used Spinrite 6 for years with very good results.  It has never killed any of my drives and has allowed me to recover data from several drives.
PCLos KDE & LXDE user.

Offline Vorteggs

  • Hero Member
  • *****
  • Posts: 2405
Re: Skip copying corrupted files?
« Reply #12 on: November 24, 2012, 12:46:02 PM »
Now I am ddrescue-ing that HDD.

Yes it writes an image and not just copying but that's the program I found to be able to skip corrupted files when copying.

As I was searching on the Net the other solutions for data retrieval lay on this very program or similar algorithm. :-\

So far it seems I will run it for 100 days more... :-\ I told it to try three times before skipping and may be I shouldn't.

Quote
[root@localhost Store]# ddrescue --direct --max-retries=3 -v /dev/sda1 Store_rescuscue.log


About to copy 276542 MBytes from /dev/sda1 to Store_rescue
    Starting positions: infile = 0 B,  outfile = 0 B
    Copy block size: 128 hard blocks
Hard block size: 512  bytes
Max_retries: 3   
Direct: yes    Sparse: no    Split: yes    Truncate: no

Press Ctrl-C to interrupt
Initial status (read from logfile)
rescued:   109773 kB,  errsize:       0 B,  errors:       0
Current status
rescued:   121105 kB,  errsize:   7671 kB,  current rate:     2560 B/s
rescued:   125250 kB,  errsize:   9965 kB,  current rate:      520 B/s
   ipos:   135216 kB,   errors:      80,    average rate:      788 B/s
   opos:   135216 kB,     time from last successful read:       0 s
Copying non-tried blocks...

Wish me luck :D

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3730
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: Skip copying corrupted files?
« Reply #13 on: November 24, 2012, 01:01:12 PM »
We have an another tool, too
Quote
unstopcp
Running Roadkil's Unstoppable Copier

Offline Vorteggs

  • Hero Member
  • *****
  • Posts: 2405
Re: Skip copying corrupted files?
« Reply #14 on: November 24, 2012, 01:12:02 PM »
Thank you very much Daniel!

Installed it and interrupting ddrescue now... It will start from the point of interruption the next time (if) I run it again.

Will report further.
« Last Edit: November 24, 2012, 01:13:54 PM by Vorteggs »