Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have remote stations that collect data from sensors (ARM Debian) and transfers sets of data (about 1.1 MB) every 15 minutes (server is full Debian). On one station GSM reception is poor and standard scp transfers are often broken and have to be started from beginning.

Now I'm trying rsync. On station I invoked:

rsync --partial --remove-source-files --progress --rsh=ssh -z FILE root@SERVER:/DIR/

After several minutes file appeared on server. (is it possible to see current transfer status on receiving server - file appeared when transfer was completed?)

How to resume transfer when it's broken? If file is not deleted transfer was not completed?

share|improve this question
Unfortunately my broken transfers are started all over again. How to resume? – Marcin Polkowski Jul 31 '13 at 22:33
--append helped. – Marcin Polkowski Aug 1 '13 at 13:16

Rsync exits with a non-zero exit code if the transfer doesn't complete. If you're using bash or a similar shell, a simple solution would be to run it like this:

until rsync --partial --etc
    sleep 1
    echo trying again

This will keep rerunning rsync indefinitely until it succeeds. The commands inside the do...done block are just an example. You could put something else there.

share|improve this answer
I would not recommend this. It could easily get stuck in an infinite loop (what happens if the network goes down? Or if you run out of disk space?) – num1 Oct 10 '13 at 19:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .