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?

  • 1
    Unfortunately my broken transfers are started all over again. How to resume? Commented Jul 31, 2013 at 22:33
  • 1
    --append helped. Commented Aug 1, 2013 at 13:16

1 Answer 1


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.

  • 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
    Commented Oct 10, 2013 at 19:24

You must log in to answer this question.

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