Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to copy a large number of files to a hard disk drive over USB, but the connection to the drive will randomly fail, causing the drive to appear as though it is unplugged and immediately plugged in again. Can anyone recommend an automated method that will resume the copy from where it left off on this event? even something where I must manually tell it to continue would be acceptable, provided it knows at which point to resume. Using Linux (Linux Mint 13 Cinnamon 32 bit)

share|improve this question
add comment

3 Answers

up vote 4 down vote accepted

I think rsync can do this for you. In the man-pages I found the timeout flag, which you want to be non-zero, so

rsync -avz --timeout=60 source/ /mnt/usb/
share|improve this answer
    
Disclaimer: I did not test the command. –  Bernhard Aug 13 '12 at 9:01
    
Don't worry, I'm not stupid enough to type a command without checking up on it. I'll look into rsync now thanks^_^ –  James Aug 13 '12 at 9:06
2  
rsync was the tool for it, just restarted it on each fail and let it try to sync the dirs, which copyied only what needed to be. Thanks ^_^ –  James Aug 14 '12 at 8:10
add comment

I am experiencing a similiar problem. I thought someone finding this thread might have use of my solution.

I need to move backups from one USB drive to the other. Each USB drive on its own works fine, but when I use both at the same time they will show this "disconnect / immediate reconnect" behaviour. I suppose it is an issue of the USB power supply of my notebook rather than the hard drives.

However, additionally the files I want to move are 30GB (RAR file) and 100GB (Truecrypt Container) in size respectively. The best result so far was being able to transfer a single RAR file completly before the connection breaking, but for the Truecrypt file the best I achieved was 40 GB.

My current solution: Using ddrescue. When used with a logfile, it can resume transfers. Handy feature :-)

ddrescue /sourcedrive/backups.tc /targetdrive/backups.tc /targetdrive/logfile

I will probably perform an sha512sum check afterwards though to make sure, the files have been correctly transferred.

I was doing this with cygwin under windows.

share|improve this answer
add comment

If the "connection to the drive will randomly fail" you should not be copying anything to it, regardless of the tool used you will likely run into problems.

rsync is a very good copy tool, but it not capable of performing magic.

share|improve this answer
    
"should not be copying anything to it". I know that. You know that. Unfortunately, my bank balance is blissfully ignorant of this. If you can think of a viable alternative method of copying 78 GiB of data to a computer that will never be connected to the same network as the source, I'd love to hear it... –  James Aug 13 '12 at 10:05
    
@James - FTP? :P –  Robotnik Aug 14 '12 at 4:47
    
78 GiB over FTP? @Robotnik are you having a laugh? –  James Aug 14 '12 at 8:11
    
@James Yeah I was joking, sorry :P. But on a more serious note, perhaps try a different cord to connect the hard drive to the computer, and/or download a hard drive diagnostic/repair tool. There are heaps of them online, for example this list here –  Robotnik Aug 14 '12 at 10:49
    
Diagnosed hdd, got no reported failures. Checked cable with different hdd, no errors, same hdd different cable same issue. I think the connector in the hdd itself is the faulty bit. –  James Aug 14 '12 at 11:38
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.