It is a known issue with the current version of bisync, and I'm working on a fix for it. Progress can be tracked in the following GitHub issues:
- Bisync fails when files are added during bisync operation · Issue #6841 · rclone/rclone · GitHub
- bisync: handle volatile changes consistently · Issue #5676 · rclone/rclone · GitHub
In the meantime, my recommendation is to use --check-sync=false
and periodically do an independent integrity check as described here.
The reason this is ill-advised is because --resync
will only copy (not sync) each side to the other. Therefore, if you included --resync
for every bisync run, it would never really be possible to delete a file -- the deleted file would always keep reappearing at the end of every run (because it's being copied from the other side where it still exists).
While you could write a short script to do this, I wouldn't recommend it, as there are scenarios where a --resync
would make things worse instead of better. The path1 and path2 are out of sync
error can mean that files were added during the run (as you noted), but it can also mean that files were deleted (or renamed) during the run. In this case, running a --resync
next would cause these intentionally deleted files to reappear. What you'd want to do instead (at least, until the underlying issue is more properly fixed in a future version) is manually delete these files from both sides, and then run the --resync
.
In general, bisync requires a --resync
as a safety switch when it thinks a manual intervention from the user could be required before the next run to avoid data loss. So, running a --resync
automatically, without first checking things out, would essentially bypass this safety feature.
(In the current stable version, bisync is admittedly a bit overzealous about requiring --resync
in some scenarios where it's not truly needed. This is addressed in the latest beta by the new --resilient
feature.)
It's a good thought, but it will not help with this particular issue, because bisync has its own listing/delta engine that is not controlled by --check-first
. The more relevant flag in this case is --check-sync
.