Directory deletion on remote computer

The error is about the local situation, the situation in your RO folder. It doesn’t matter if it’s empty on the remote/SO.

Are the files that are contained there-in ignored on SO? Folder types don’t matter if the file is ignored: RO can’t mirror SO when it comes to stuff that SO has ignored (not deleted). Or differently put a folder only deletes items when it is commanded to, and your remote ignores those items, which means it doesn’t command anything regarding those items.

Example:

A and B have foo/bar. Then A ignores bar and renames foo to notfoo. Thus A tells B to delete foo, create notfoo and notfoo/bar and that it doesn’t care about foo/bar anymore. B reacts by attempting to remove foo, noticing there’s foo/bar that exists and is supposed to exist (noone ever told B to remove it), thus it tells the user that it can’t delete foo and needs help to know what is the correct way forward (delete foo/bar or recreate foo).

The error is about the local situation, the situation in your RO folder. It doesn’t matter if it’s empty on the remote/SO.

ok, I misread that, it makes sense now

Are the files that are contained there-in ignored on SO? Folder types don’t matter if the file is ignored: RO can’t mirror SO when it comes to stuff that SO has ignored ( not deleted). Or differently put a folder only deletes items when it is commanded to, and your remote ignores those items, which means it doesn’t command anything regarding those items.

no, the only ignore that’s in place on the folder was to stop one pst file being synced to me constantly as it’s a live outlook archive. The files that are in question comprise mainly of jpgs and docs

image

I only added the (?d) recently based on your earlier reply to the OP. It didn’t make a difference.

Just to be sure: You don’t have any ignores except that one on both RO and SO, and there’s no rental.pst in any of the directories mentioned in the errors?

Ignore only on SO, no ignore on RO - I didn’t think it would be necessary to have the same ignore on both sides.

the ignored pst is in a totally different folder

image

whereas the other directories that are not in sync in different locations, eg

SO

image

RO

image

Do the ignores on SO match any of the files present in the directories that create an error on RO? Or somewhat equivalently: If you add the same ignore patterns on RO as on SO, does the problem go away?

The ignore does not match to any file in the affected directories. It’s only for one file thats located in the zzITfiles - as shown on the snips

I added the same ignore “(?d)rentals.pst” to the RO end, it took a while to scan but no change.

I misinterpreted this as meaning "there’s more than just (?d)rentals.pst in SO’s patterns. Then it’s unclear what is going on here.

Could you grab the output of GET /rest/db/file — Syncthing documentation (or even better /rest/debug/file which works the same but has more info) for any of the files inside the directories that cause the errors please.

On the SO or RO side?

RO or both :slight_smile:

I struggle (and panic) at the sight of rests and API as im on Windows, however we had a similar thread back in Feb 18 which I referred back to. Anyway, the output keeps failing…

I took a random filename from one of the affected directories on the RO side and got this

I’m sure that I have everything right, file paths etc, and based on your Feb 18 comment (I had the same PS error that time too)

The command itself is actually fine, it just responded that there is no such file (“No such object in the index”). Is the file actually in the folder root? If it’s in a sub-directory, you need to give the path relative to the root (e.g. file=foo/00b7974a-0000-0000-0000-00093d000000.vhdx ).

I wonder if it’s not in the db and hence can’t be processed / synced. Perhaps it’s easier to reindex and see what happens?

The problem is that you wrote the full, absolute path for file=. It needs to be the relative path, e.g. if your folder root is F:\yourfolder and the file F:\yourfolder\foo\bar, write foo\bar. Plus I think there’s no folder=*yourFolderID in the screenshot. The url needs to look something like localhost:8384/rest/db/file?file=foo\bar&folder=yourFolderID.

I tried it both ways and got the same result

and targeting this file (garden.jpg)

image

and also changed the case from upper to lower to see if that had any affect

Case does matter. In the screenshot it always was “Garden.jpg” in the rest path, while it is “garden.jpg” in the file manager. I assume that’s what you meant by “changed the case”, i.e. you did try “garden.jpg”.

Generally, I am out of ideas for now (except for wanting to integrate a “rest client” into the syncthing binary to get rid these kinds of problems).

Path separators and url encodong matter too, just an idea.

I changed the case to match the file name and also changed the filename to both match the PS script and to also ‘touch’ the file, which did actually result in it getting deleted - eventually.

I have now renamed the index folder on the RO side, paused all the folders except the one with the issue and will leave it to scan over night and will see in the morning if there are any differences.

Having removed the RO index folder, it’s at least realised that there is a mismatch in the number of files (as mentions on comment 5)

image

However after reverting, the query folders still remain

image

so this time I will wipe the index on the SO end. If that fails I will manually delete them

This is getting odd. The SO end has finished scanning and now it’s decided it is out of sync…

image

Looking at the out of sync items, they are all the files that were removed previously, but not on the RO end, which is now reporting…

image

so essentially I have reversed yesterdays ‘Syncthing state’. However the directories on the RO end which should not be there, are still there…

image

Having reverted the SO folder

image

thats all fine and as it was yesterday

rescanned the RO folder

image

and now both are saying up to date, but there is still a file # difference and the undeleted files still exist.

image

I’m out of ideas, so i’m manually deleting the odd ones.

There’s a clue: There’s 12 out-of-sync directories and 12 directories difference in local vs global state on the SO end. I just don’t know what to do with that clue.

The pictures show that the local directories are containing files that on the remote end were either deleted or in a renamed directory. However it does matter if it’s empty on the remote end as the local end should reflect those changes. At the moment they are not for unknown reasons.

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