22

I recently had to copy about 20 GB of data split between about 20 files from my laptop to an external hard drive. Since this operation takes quite a while (at ~560kb/s), I was wondering if there was any way to pause the transfer and resume it later (in case, I need to interrupt the transfer). As a side question, is there any performance difference between copying from the terminal vs copying from Nautilus?

20

I would recommened using rsync.

Example:

rsync -a --append source-file destination

If you want to see the progress, add the --progress option to the command.

alt text

  • 4
    The -append option seems to be the lynch-pin to the "Resume"... but is there an elegant way to "Pause" rsync, other than Ctrl+C? ... and can rsync resume accurately, after something dramatic.. eg. a power-out? – Peter.O Dec 17 '10 at 7:57
  • If from coming from google in 2016, one way would be to launch the rsync command as a process from python or similar and monitor the process while reading its output. Then you can trigger a SIG/signal against the process. A sh file should be able to do this i would think – Mayhem Oct 11 '16 at 7:12
3

short answer, need no installation, to pause use kill -STOP PID
to continue paused process use kill -CONT PID
where PID is Process ID. you can get PID by running System monitor or top command

2

I can answer only the part about the difference between terminal and nautilus. I have checked several times this. It appears copying from terminal is faster than any graphical way like nautilus. At least in my case, when i copy about 32GB of info, it takes about 3 to 5 minutes less from terminal than nautilus from a 25 minute copy. that is about 10%-20% of the time. About a way to resume a copy to your external unit i think curl or rsync would resume a failed copy. At least with cp command. I have not tried this myself (I will try tomorrow) but this two might work.

For curl you need to aptitude install curl or apt-get instal curl since it does not come with ubuntu by default.

Use curl --help or rsync --help to find out more. Tomorrow i will show how to copy with both if you could not find the way.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

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