Sync tries to delete excluded files

Bisync should use --filters-file instead of --filter-from (and also, a --resync is required when you change your filters.)

Give that a try and see if that solves it? If not, let me know a specific example of a filename to look at in your log, which is getting deleted but should not be.

Does that mean I cannot simply bisync with different filters from time to time? That's what I wanted to do...

I think --filter-from is still supported in bisync rclone bisync

You can, but you need to --resync when you do this. This is required for safety, because if a file is included for one run, and excluded for the following run, bisync would think the file has been deleted. Unlike sync, bisync is stateful -- it remembers what was there during the previous run.

I see, so it is by design that bisync doesn't support partial sync without --resync. I don't know if that's a good idea to use --rsync` on my every run... How do you think?

if a file is included for one run, and excluded for the following run, bisync would think the file has been deleted.

Actually that might be my question, should bisync think the file is deleted simply because it was not excluded but is now?

You definitely should not use --resync on every run. Only the first run, and in the rare event that you need to change your filters. More detailed explanation here.

Yes, because the filters are not supposed to change without a --resync. This is actually enforced when using --filters-file.

What do you mean by "partial sync"? Bisync already syncs only the files that have changed since the last run, so in that sense, every sync is a partial sync. Generally people don't need to change their filters very often with bisync (it is designed to repeat runs with the same settings on a regular schedule). What is your use case that needs this?

What you could do, however, is have a separate bisync rooted at a particular subdirectory, if that's helpful for your use case.

Thank you for the reply! For "partial sync" is that I want to sync only a part of the total syncs to avoid long processing time, because I have over 10k files synced right now, so I'm trying to implement a way that I can only bisync files that are necessary for my current task (by different filters), then got to understand it is now allowed in bisync.

I agree that having separated bisync roots might be the only solution, but my files may be scattered all around the file system and on the end the only root I can use is $HOME, which is unfortunate. On the end I may need to use sync and give up all the benefits bisync brings in this case.

Just for reference, my bisync filters include about 225k files, and a typical run (bisyncing local and drive) takes about 2m27s. I would guess your bottleneck is probably onedrive (or your network bandwidth), not bisync.

1 Like

add delta = true to your config. In my case I see tenfold speed increase for some operations for my OneDrive account. It is false by default as sometimes it can have opposite effects. I think the best option is to test. Also instead you can put it in your command line as --onedrive-delta flag.

Here more details.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.