I use rsync over tor. It works for a while, then it drops the connection. That in itself is not a big problem and I suppose it is not entirely unexpected when running long sessions over tor that takes many minutes to complete.

When I restart rsync it goes through the files in the same order as last time. That is a problem because some of these files change often (think of /var/spool of a busy mail server and you get the idea). This means that the files it gets to first get updated often, while files it never gets around to are never transferred.

What I would prefer is to have rsync either continue where it left off or at least transfer the files in random order.

Is there a general way of doing that?

3 Answers 3


The solution became this:

find . -maxdepth 4 -depth -type d | shuf | torsocks parallel rsync --delete -zHax --inplace --rsync-path='mkdir -p {} && rsync' ~/{}/ qnek3r4buxhaa6g3.onion:./{}/

Not exactly pretty, but it seems to do the job.


Use the switch --partial. This makes rsync carry on from where it left off.

  • 1
    That does not help. Rsync still syncs the files earlier. I believe partial makes sense for big files, but that is not the issue here. In this case --inplace actually works better because you are not waiting for the tempfile to be created.
    – Ole Tange
    Aug 13, 2014 at 20:56

There are a couple of options available. You can use filter rules on some of the rsync runs so that the busiest files are ignored, allowing less busy files to be transferred. If the list of busy files is too long to be easily assembled into a set of filter rules, you can use --modify-window with a large value on some of the rsync runs. This too will have the effect of ignoring recently modified files and transferring files that were modified outside the modification window.

  • I like the --modify-window idea except it only works if the sizes are the same, and they are not (just like the spool dir they new files are created and old files removed in the active dirs), so I also need the (non-existing option) --time-only. Listing the busiest dirs seems not like a general solution - but something that will only work for this set of files.
    – Ole Tange
    Aug 13, 2014 at 21:29

You must log in to answer this question.

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