1 Device on backup device says sync with 1 item out of sync

I’m having a bit of difficulty envisioning the current state of the setup, so please correct me if I have it wrong…

syncthing

So “Backup” is acting as the hub for a Syncthing folder “Adventure” shared by “Work” and “Laptop” (“Work” and “Laptop” aren’t connected to each other).

If on “Backup”, the Syncthing folder “Adventure” has a .stignore file with the following patterns…

(?i)~$*.do{c,cx}
~WRL*.tmp

… “Backup” will ignore any matching files – regardless of which filesystem folder they are in – shared by “Office” and “Laptop”.

And because “Backup” is ignoring any matching files, it won’t indirectly pass them on from “Office” to “Laptop”, and vice versa.

Alternatively, instead of placing a suitable .stignore file on “Backup”, it could instead be on both “Office” and “Laptop”. It’s not as flexible for your particular situation because you’d need access to “Office” anytime the ignore patterns needed updating.

Okay

Names of Machines

Backup (my pc): Wipeout

Work (PC): Bucks-Office

Her Laptop: Adventure

These 2 machines all link to 3 folders on my backup, name of the folders in Syncthing not on the actual drives of the 3 machines. I have for obvious reasons not written her actual name on the one item that’s linked using it so I will just do (Her name) instead.

Book Link

(Her name) Web

Print Please

(Her name) Web is for her business she is working on opening.

Print Please is so she can get things printed either at work or at home if she is out with her Laptop or need it at home.

Book Link is where she is writing her book in and that’s the folder causing problems.

Book Link is the one with all the temp files that started this mess.

On Adventure aka her laptop did it say 99% sync on my machine Wipeout aka Backup, until I added the .stignore with those same settings and voila it stopped misbehaving and now says up to date, the folder it self Book link never changed from being up to date.

I haven’t had time to check on her Work PC if book link and backup still says up to date after my .stignore rules was put in place on both backup and laptop.

But anyway as shown above for some reason even with the .stignore which contain the following:

~*

*.tmp

.*.swp

desktop.ini

Thumbs.db

So her laptop booted up and instantly started complaining about the 5 temp files it couldn’t “sync” on both Backup and Laptop, when I added those lines above to .stignore on Laptop did it fix the issue of it claiming it was out of sync and went up to date.

But as you can see for some reason has my backup machine NOT done so it still tries to send the very temp files it is told to ignore and that laptop is told to ignore to the laptop.

I have yet to find time to go and check her work machine to see if it there has sync issues and if so if the .stignore will fix it.

But I managed to fix the work pc sync issues using the .stignore on my backup so why is the laptop being funny?

For 3 days I had a yellow triangle on the Book Link claiming it had failed to sync with the Laptop and the error in the log was the very 5 temp files it is told to ignore on both ends.

I really wished I had remembered about Office temp files and .stignore before I setup the sync between the machines so this could have been avoided.

But right now I just would like to have syncthing to show that her laptop adventure is up to date and ignore the temp files which the backup is insistent to try and sent even though the laptop refuse to accept them with or without the .stignore setup.

I hope I explained this correctly.

The patterns above look fine for covering MS Word’s temporary scratch files.

It sounds like all three devices are interconnected via Syncthing, i.e., Laptop/Adventure and Work/Bucks-Office talk directly to each other (doesn’t match the diagram I posted earlier).

So if I’m understanding the current setup, Backup/Wipeout and Laptop/Adventure both have identical .stignore files as noted above, while Work/Bucks-Office does not yet have a .stignore file.

If Backup/Wipeout isn’t acting as a hub/relay between Laptop/Adventure and Work/Bucks-Office, then the only way all three devices will show 100% sync status is if all three Syncthing folders – i.e., “Book Link”, “(Her name) Web”, “Print Please” – have .stignore files on every device.

If Work/Bucks-Office is connected to Laptop/Adventure, it doesn’t matter if Backup/Wipeout has a .stignore file because Work/Bucks-Office bypasses Backup/Wipeout by syncing files directly to Laptop/Adventure.

That’s the funny thing.

Your diagram is correct.

On Work PC only device it sees is my PC the Backup or Wipeout using it’s name.

Work PC has the 3 folders described linked to on Wipeout.

On Laptop or Adventure as my wife called it only has 1 device it is linked to Wipeout or backup pc.

Laptop only has the 3 folders linked as described.

And yes Both Laptop and Backup now has identical .stignore file in all 3 folders being synced, I did it due to when Laptop booted up even though Backup had the ignore installed would try and take the temp files that I had btw removed from the backup system completely yet it still tried and as you can see it even says they came from the work pc no idea how and why as the work pc was offline at the time.

I really hope I am explaining it right.

That’s good. I was concerned that I was missing something about your current setup.

So, there’s a bit of confusion regarding interpreting the list of out-of-sync files on device “Adventure”.

Note that all of out-of-sync items are a week to almost 2 years old. Chances are that all of the items are small enough that they were synced within seconds.

4 of the 5 items were last modified by device “Bucks-Office”. Since those files are being synced from “Bucks-Office” to device “Wipeout”, it doesn’t matter if “Bucks-Office” was offline at the time because the data blocks required could have been – and most likely are – already available on “Wipeout”.

As soon as “Adventure” was reachable, “Wipeout” told “Adventure” about the files. “Adventure” then used a combination of local files and remote files on “Wipeout” to reconstruct the required files.

Patterns in .stignore only apply to files that haven’t already been synced, so you’ll have to delete any undesired files that got thru.

The list of out-of-sync items aren’t necessarily only items that are still sitting on “Bucks-Office” waiting to be sent. When you pulled up the list of out-of-sync items on “Wipeout” for “Adventure”, you were looking at what “Wipeout” needed to do to help make “Adventure” up to date The “Mod. Device” column isn’t referring to which device still needs to send the corresponding file, it’s referring to which device a change originated from (“Wipeout” already knows about and likely has the file in hand).

But that’s the funny thing, all the temp files Adventure on backup is out of sync with was deleted on Wipeout before Adventure came back on, up until Adventure came back on was it up to date as far I recall. But the files in question are deleted and gone on Wipeout I can’t give it to Adventure, nor can Adventure get them any more.

And on Adventure side are all folders and Wipeout up to date now.

So no idea on how to fix the trying on syncing to Adventure by Wipeout with files no longer existing in the folders.

When Syncthing scans your files to be synced, it builds a map of varying sized blocks, that when chained together reconstructs any given file.

So if your files are like a collection of Lego bricks, you could toss out several Lego models, but if any other Lego models share the same bricks, the missing models can easily be reassembled from the remaining bricks.

Unlike its predecessor .doc, a .docx file is actually a ZIP file in disguise. For example, after creating and saving a blank page in Microsoft Word, I extracted a list of the contents from my 11,507 byte msword.docx file:

Archive:  msword.docx
  Length      Date    Time    Name
---------  ---------- -----   ----
     1312  1980-01-01 00:00   [Content_Types].xml
      590  1980-01-01 00:00   _rels/.rels
      817  1980-01-01 00:00   word/_rels/document.xml.rels
     1807  1980-01-01 00:00   word/document.xml
     6799  1980-01-01 00:00   word/theme/theme1.xml
     2504  1980-01-01 00:00   word/settings.xml
     1340  1980-01-01 00:00   word/fontTable.xml
      576  1980-01-01 00:00   word/webSettings.xml
      742  1980-01-01 00:00   docProps/app.xml
      737  1980-01-01 00:00   docProps/core.xml
    28755  1980-01-01 00:00   word/styles.xml
---------                     -------
    45979                     11 files

Your temporary .docx files are a fraction of the size of my blank document. Cropped from your earlier screenshot:

Note that 4 out of 5 of the unwanted temp files are just 162 bytes in size – small enough and old enough for those string of bytes to very likely be found in another existing file. Chances are that those 162 bytes are some kind of stock file header info common to all temporary .docx files.

So as long as Syncthing can find those bytes elsewhere in another file you didn’t delete, it can reconstruct the required files.

You deleted the files from “Wipeout” while “Adventure” was powered off, so “Adventure” still thought it needed those files when it booted back up. Remember that Syncthing can reconstruct missing files with pieces from other existing files, so “Adventure” could sync those files without ever downloading anything new from “Wipeout” (the tiny 162 byte file size makes it extremely likely).

Depending on the order of events and timing, Syncthing can sort things out on its own, but there are niche cases (search this forum for examples) where user intervention might be required because some devices where powered off, conflicts occurred, etc.

Syncthing’s “Understanding Synchronization” page is well worth a read to better understand the sync process.

1 Like

So is there a way on Adventure and Wipeout to remove the idea that those files need to be synced as they don’t exist anymore on Wipeout if they exist anywhere it will be on Adventure or Bucks-Office where she does her writing. Only files left are the actual documents the temp files are linking to ignore the ~WRL0003.tmp as I have no idea where that came from or why.

But the rest are temp from the actual files which:

~$The lower hall -Rannous.docx temp of 2 The lower hall -Rannous.docx where last worked on and updated on 06/04-2022

~$ A change in the weather.docx temp of 13 A change in the weather.docx where last worked on and updated on 01/07-2023

~WRL0003.tmp no idea as I have removed it from Wipeout completely full delete.

~$Costa.docx temp of Costa.docx where last worked on and updated on 13/07-2019

~$eliana.docx temp of Heliana.docx where last worked on and updated on 14/12-2019

All these makes no sense to me really don’t.

The simplest solution is to create dummy files on “Adventure”, wait at least 10 seconds (Syncthing’s default countdown after detecting filesystem changes), then delete the dummy files.

Because the dummy files have newer timestamps, the versions on “Adventure” will supersede the older ones. Then when the dummy files are deleted, Syncthing will inform “Wipeout” – and by extension – “Bucks-Office” to purge those unwanted files from their respective databases.

So for example, launch Windows Notepad, type something or nothing at all, and save the document as ~$eliana.docx (placing it exactly where the location of the out of sync file is).

It doesn’t matter it you use Notepad and/or create a real .docx file. It only matters that there’s a matching file for Syncthing to process.

If it were me, I’d use the echo command because it works the same on Windows, macOS, Linux and Android:

echo > C:\Users\owner\Documents\characters\~$eliana.docx

The sample command above creates a text file with just a newline character. Syncthing doesn’t care that it’s not actually a Word document.

Definitely read Syncthing’s “Understanding Synchronization” page.

I will do this on Adventure as soon I can and get back to you if it fixes things.

I will also as soon I can get on the Work pc and add the .stignore files just in case.

Seems like doing the echo thing and then remove the .stignore rules temp on Wipeout/Backup and then putting them back and removing the files on Adventure and Wipeout fixed Adventure showing as syncing.

I got on the Bucks-Office and saw it was complaining about the files, but the second I added the .stignore it went yay Wipeout is now up to date, so everything is green and up to date.

I did run into a problem for some reason will the bat file I made in case it ever happen again not work on Bucks-Office location can’t be found error but that’s for another day as it is not a syncthing problem.

Thank you so much for the help let’s hope it is fixed now.

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