MacBook backup to external, skip corrupted files?

Status
Not open for further replies.
Joined
Aug 4, 2008
Messages
71
Reaction score
0
Points
6
My harddrive is corrupt, and many files are corrupt. However, many are not, and I'd like to back up everything I can to an external. The external is also full of import files for work, so I can't wipe it or anything. I want to do this promptly in case the internal is on it's last leg.

If I try to copy files manually, every time it hits a corrupted file, I get error 36 and it stops copying the rest of the files. I don't know how to use scripts, and someone said Carbon Copy Cloner would do it, but I'm afraid of overwriting stuff that's on the other harddrive that might accidentally have the same name, or just in general. It won't let me specify to a folder.

How can I copy these files, skipping the corrupt ones, before the harddrive craps completely?
 
OP
M
Joined
Aug 4, 2008
Messages
71
Reaction score
0
Points
6
Bump, I really need to figure this out before I take the computer in to Apple Care to have the harddrive replaced, hoping I'm still under warranty.
 
Joined
Nov 28, 2007
Messages
25,564
Reaction score
486
Points
83
Location
Blue Mountains NSW Australia
Your Mac's Specs
Silver M1 iMac 512/16/8/8 macOS 11.6
Don't think you can as cloning copies everything, corrupt files, and all period.
 
Joined
Dec 9, 2010
Messages
844
Reaction score
49
Points
28
Location
Virginia
Your Mac's Specs
Currently 13" Late 2010 MBA, 4GB/128GB; Early 2011 13" MBP, dual core i7 2.7ghz, 4gb ram, 500gb hd
I'd use the command line to copy the files. It'll bypass the corrupt files and keep going until it's done.

A trick to terminal is to drag and drop your source and destination folders into the terminal window instead of trying to type in the entire path. The command would look something like

sudo cp -Rf sourcefile/* destination

Step by step, the command does the following:
sudo - peform this command as though I was the root user
cp - copy
-Rf - copy recursively, i.e., get the top layer folder and all subfolders; force the copy to continue if an error is encountered
sourcefile - the folder where your data is stored.
/* - anything under sourcefile
destination - the folder where the copy is going.


So if you wanted to copy your entire home directory to your external, create a destination folder on your external drive (call it Backup or something), and, if your hard drive was "MacHD" and your home directory was named "Mydrive," the command would be:
sudo cp -Rf /MacHD/Users/Mydrive/* /externaldrive/Backup/
 
OP
M
Joined
Aug 4, 2008
Messages
71
Reaction score
0
Points
6
I appreciate your assistance, but this is absolute French to me. I'd love to try it, but I have absolutely no idea what you're talking about.
 
Joined
Sep 9, 2009
Messages
5,473
Reaction score
201
Points
63
Location
Down Under :D
Your Mac's Specs
Back to my old 2.2GHz C2D MB after selling my MBP and wondering what my next Mac will be :)
I appreciate your assistance, but this is absolute French to me. I'd love to try it, but I have absolutely no idea what you're talking about.
Yes, if it is French to you, I agree with your decision to stay away from it.
You can really mess things up using terminal when you don't know what you are doing.

What I would do is copy your essentials such as documents, photos, music, applications etc to an external HD.
Otherwise, I would use time machine, but I would exclude the folders that you suspect have corrupt files.
Then using disk utility, repair permissions and disk if necessary.

If everything checks out you are good to go.

If not, then you can perform a clean install, and if you used time machine, use migration assistant to restore what you want, and if you used the other method, drag the items back.
 
OP
M
Joined
Aug 4, 2008
Messages
71
Reaction score
0
Points
6
Everything has corrupted files. Everywhere.

Any folder with more than 10 or 20 files in it (I have lots of images saved) has corrupt files.

I'm not going to bother trying to save this harddrive. It's screwed. I can hear it clicking and catching. I'm just trying to save what I can prior to having it replaced tomorrow. But because it freaks out every time it tries to back up a corrupted file...
 
Joined
Sep 9, 2009
Messages
5,473
Reaction score
201
Points
63
Location
Down Under :D
Your Mac's Specs
Back to my old 2.2GHz C2D MB after selling my MBP and wondering what my next Mac will be :)
In that case I would just be dragging and dropping to an external HD, starting with the most important stuff.
 
OP
M
Joined
Aug 4, 2008
Messages
71
Reaction score
0
Points
6
Yes, you seem to be missing the point. Every time I drag and drop, it chokes on a corrupted file and stops transferring. I delete the corrupt file, and start over. It chokes on another. So, either I do this indefinitely for thousands of files, or I drag and drop a few files at a time, and when doing so with thousands of files in dozens of folders, it gets pretty old.
 
Joined
Sep 9, 2009
Messages
5,473
Reaction score
201
Points
63
Location
Down Under :D
Your Mac's Specs
Back to my old 2.2GHz C2D MB after selling my MBP and wondering what my next Mac will be :)
Just out of curiosity, what is the external formatted to that you are trying to drag to?
I suspect that you will not be able to resolve this without an HFS+ formatted drive.
Considering how cheap a new external is especially if you weigh against the time and inconvenience of losing your data.
If it is FAT32 (MS-DOS), you may want to look at this.
Solution to Finder “Error code -36″ in 10.6 when copying folders | MacYourself
 

bobtomay

,
Retired Staff
Joined
Dec 22, 2006
Messages
26,561
Reaction score
677
Points
113
Location
Texas, where else?
Your Mac's Specs
15" MBP '06 2.33 C2D 4GB 10.7; 13" MBA '14 1.8 i7 8GB 10.11; 21" iMac '13 2.9 i5 8GB 10.11; 6S
And if that link from 6string doesn't work for you, although that could well be your problem. Do you know if those files are really corrupted? As in you can't open them on your Mac or you're only having a problem copying them to the external drive?


If that is not your issue, will say that I'm no terminal guy either. But, you either keep doing it the way you are, or you read EvenStranger's post enough times until you understand and comprehend. It really is not that hard. We only make it hard.

Using drag and drop method mentioned - here is baby steps laid out for you.

Open a Finder Window and put it on one side of your screen.

Open terminal and put it on the other side of your screen.

In terminal - all on one line:
type sudo
press space bar
type cp
press space bar
type -Rf
press space bar
drag the folder you want to copy into the terminal window and drop it
you will notice this added a space at the end all on it's own, so press Delete one time to back up
type /*
press space bar
drag the folder where you want to put all the copied stuff into terminal and drop it
now look at it - does it match the line above except for having your folders listed there? - yes?
press enter

Don't do it, until you read the above post, so that you know what you're doing.
 
OP
M
Joined
Aug 4, 2008
Messages
71
Reaction score
0
Points
6
The harddrive is NTFS+. It's the harddrive I use for all my Final Cut editing.
 
Joined
Sep 9, 2009
Messages
5,473
Reaction score
201
Points
63
Location
Down Under :D
Your Mac's Specs
Back to my old 2.2GHz C2D MB after selling my MBP and wondering what my next Mac will be :)
NTFS could be the same problem that FAT32 would be.

I would look at bobtomay's post, as this may be of assistance to you.
 
Joined
Nov 29, 2011
Messages
1
Reaction score
0
Points
1
This thread was quite helpful for me. After readind the manual for cp, (enter "man cp" in Terminal) I found another useful argument to add to cp, "-v" for verbose mode.

I you enter
cp -Rfv [source]/* [destination]/

then cp will let you know what it's doing,

A list of errors for files that didn't transfer can be found in the system log in the console app in Terminal
 
Joined
Jan 19, 2012
Messages
1
Reaction score
0
Points
1
Thank you very much!!! This worked out perfect, I was having the same problem and Im not a programer, but baby steps worked great!
 
Joined
Mar 2, 2012
Messages
1
Reaction score
0
Points
1
I entered the command in terminal and entered my password and assume the process is underway. Does this command line copy behind the scene's so to speak? because there is no indication of progress though if I try and close terminal it says "Closing this window will terminate the running processes: login, bash, cp."

I am trying to copy 280gb and it's been about an hour and terminal is still prompting with the same closing terminal window message.I am unsure if I now actually copy the folder I want to the drive I want (outside of terminal)?
 
Joined
Jun 13, 2011
Messages
73
Reaction score
1
Points
8
I entered the command in terminal and entered my password and assume the process is underway. Does this command line copy behind the scene's so to speak? because there is no indication of progress though if I try and close terminal it says "Closing this window will terminate the running processes: login, bash, cp."

I am trying to copy 280gb and it's been about an hour and terminal is still prompting with the same closing terminal window message.I am unsure if I now actually copy the folder I want to the drive I want (outside of terminal)?

Assuming you are copying to a USB external drive, at a conservative 20 MB/s transfer speed, 280 GB of data will take just under 4 hours to copy, so it's very possible that it is still going. Did you use the verbose option (-v in the terminal command)? That would show you in the terminal each file it copies or fails to copy as it is copying them. Otherwise, I'd just wait a while and see if it finishes up in a few hours.
 
Status
Not open for further replies.

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top