Was hoping someone could shed some light before i proceed.
PC indexdb folder is completely corrupted on a ntfs partition (on linux), so re-formatting the drive however some things to note:
- i have a backup of the whole ~/.config/syncthing folder from a few days ago.
Both devices where the folders/files are intact.
- There have been some new files on both devices during the time the db got corrupted.
What happens if i restore the backup of the Syncthing folder even though new files have been created/deleted on one or both devices during that time or will i lose any files or have any unintended side effects if the older db that i will restore is not up to date?
Any differences between now and what you restored will be considered new changes, so you may get some sync conflicts. If the actual synced files are intact and up to date I don’t think it will cause any major issues, but if there are, for example, files missing that are supposed to be present according to the database then those will be considered deleted. Be careful.
Thanks for the reply.
The files are intact, however what do you mean by “up-to-date”? They are but not up-to-date in the eyes of Syncthing on the corrupted device. Maybe my question should be, what happens if the remote device’s indexdb is more up-to-date after i restore the older syncthing indexdb?
The interaction is less important between local device A and remote device B, as it will just do the right thing. The more scary thing is local filesystem as it stands is of time T and the database it has, is as of time T-2 (or the other way around), at which point it might just go and delete everything. Best option is to not mess about and assume that database is not a backup’able thing, but ephemeral state, and let syncthing rediscover the reality of the filesystem from nothing to build the database, at which point losing data is minimised (with likeliness of conflicts is increased)
I have already bit the bullet and restored the backup Syncthing folder (DB) from a few days ago, and it looks green on both devices (in both GUI’s). It even updated the files that were created/deleted/ I checked the Size of the Folder before and after.
I noticed a few things…
In the logs it initially said:
is delta index compatible, but seems out of sync with reality
Then, another folder on Device2, said i must revert a few MB’s of Data, which i dont know why since i didnt make any changes to that folder.
And thirdly, (Something which i dont remember if it was like this…) The Local State on Device1 is reporting the files that are included in the ignore patterns on Device1 only.
But Device1 Global State = Device2 Global State = Device2 Local State which is showing a bigger number of files than the included files.
Is this normal behavior then? (im guessing its reading the files in the root folder on Device2 that are not included) Am i correct?
Edited, post since i made a mistake.
If you’ve excluded files that’s normal. “Global” is the sum total of what’s announced by all devices, “local” is after applying local ignore patterns (and depending on what’s actually been synced to the local device).
Thanks @calmh, appreciate the fast response.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.