#19 Recovery from failed run.
Closed: Fixed None Opened 7 years ago by tibbs.

If a run aborts, rsync has probably left aroud a bunch of .~tmp~ directories. This should all have good content and no partial files.

Fortunately rsync fixes the permissions immediately after it transfers each file, and doesn't keep the paretially tranfered files there, so it is not in the least harmful to move these files one level up in the filesystem as long as they aren't replacing existing files.

So we should simply do this by default whenever a .~tmp~ directory is found. If it is necessary to move any files in this way, though, we will need to regenerate the local file list in full, or modify it each time we move a file (which probably isn't worth it).


Should be supported now with fba8106. Just need to make it configurable.

It turns out that regenerating the local file lists is not necessary; we'll just have fewer files to delete. This lets rsync fix up the permissions if necessary (though it seems not to be necessary).

This may result in some stale files which are on the disk but not in the master file lists. I think it's safe to have them cleaned up at the next run. (Such files are in general safe to exist on a mirror.) It is possible to get this done perfectly by checking the master file list before moving such files, but I don't think it's worth it.

Now all done and configurable (via NORSYNCRECOVERY).

Login to comment on this ticket.

Metadata