Effect of parameter | -reset-database // -reset-deltas

Because of the conversion of the database from v1.3.4 to v1.4.0-rc.x, I always have had problems matching two of my Synology servers. When trying to clean up or reset the databases with the commands

-reset-database

-reset-deltas

until today, even with the rc.11, no effects have been observed. So far, deviations or errors have not been changed or corrected. I don’t know if this is a specific Synology problem or a general one.

How is that issues with you?

It is also strange for me, I can rename, move, delete the directory /var/packages/syncthing/target/var/index-v0.14.0.db/. Syncthing still work as if it were nothing after starting, but the directory will not be recreated and to create the database again. Maybe I waited too short, because it was not plausibel for me.

I would like clarification on how to reset the database manually. Should I just delete the contents of the /var/packages/syncthing/target/var/index-v0.14.0.db/ directory?

Until this is clarified, I can only disconnect and reconnect the peers (folders), but this is basically not a solution. If nothing helps, finally I must delete the configuration.

If its not creating the directory, you are looking for it in the wrong place.

1 Like

Is the correct one, because Syncthing works in the folder:

/var/packages/syncthing/target/var/index-v0.14.0.db$ ls -al

total 2407188

drwxr-xr-x 1 sc-syncthing root            634 Mar  7 11:41 .
drwx------ 1 sc-syncthing root            374 Mar  7 08:21 ..
-rw-r--r-- 1 sc-syncthing syncthing    183980 Mar  6 00:33 648138.ldb
-rw-r--r-- 1 sc-syncthing syncthing 134311709 Mar  6 23:57 648178.ldb
-rw-r--r-- 1 sc-syncthing syncthing 134256461 Mar  6 23:57 648179.ldb
-rw-r--r-- 1 sc-syncthing syncthing  80582253 Mar  6 23:57 648180.ldb
-rw-r--r-- 1 sc-syncthing syncthing     60567 Mar  7 02:36 648193.ldb
-rw-r--r-- 1 sc-syncthing syncthing    325910 Mar  7 08:09 648215.ldb
-rw-r--r-- 1 sc-syncthing syncthing   6068311 Mar  7 08:13 648226.ldb
-rw-r--r-- 1 sc-syncthing syncthing     44916 Mar  7 10:54 648359.ldb
-rw-r--r-- 1 sc-syncthing syncthing 134507567 Mar  7 11:00 648372.ldb
-rw-r--r-- 1 sc-syncthing syncthing 134511782 Mar  7 11:04 648382.ldb
-rw-r--r-- 1 sc-syncthing syncthing 134619869 Mar  7 11:04 648383.ldb
-rw-r--r-- 1 sc-syncthing syncthing 134376349 Mar  7 11:05 648384.ldb
-rw-r--r-- 1 sc-syncthing syncthing 134380445 Mar  7 11:05 648385.ldb
-rw-r--r-- 1 sc-syncthing syncthing 134414535 Mar  7 11:05 648386.ldb
-rw-r--r-- 1 sc-syncthing syncthing 134431305 Mar  7 11:05 648387.ldb
-rw-r--r-- 1 sc-syncthing syncthing 134430591 Mar  7 11:06 648388.ldb
-rw-r--r-- 1 sc-syncthing syncthing   2308300 Mar  7 11:06 648389.ldb
-rw-r--r-- 1 sc-syncthing syncthing    533715 Mar  7 11:41 648390.log
-rw-r--r-- 1 sc-syncthing syncthing   8801559 Mar  7 11:40 648391.ldb
-rw-r--r-- 1 sc-syncthing syncthing 134506717 Mar  7 11:40 648392.ldb
-rw-r--r-- 1 sc-syncthing syncthing 134510721 Mar  7 11:40 648393.ldb
-rw-r--r-- 1 sc-syncthing syncthing 134504897 Mar  7 11:40 648394.ldb
-rw-r--r-- 1 sc-syncthing syncthing 134353675 Mar  7 11:40 648395.ldb
-rw-r--r-- 1 sc-syncthing syncthing 134421849 Mar  7 11:40 648396.ldb
-rw-r--r-- 1 sc-syncthing syncthing 134406388 Mar  7 11:40 648397.ldb
-rw-r--r-- 1 sc-syncthing syncthing 134394386 Mar  7 11:41 648398.ldb
-rw-r--r-- 1 sc-syncthing syncthing  78959467 Mar  7 11:41 648399.ldb
-rw-r--r-- 1 sc-syncthing syncthing        16 Mar  7 10:54 CURRENT
-rwxr-xr-x 1 sc-syncthing root             16 Mar  7 10:54 CURRENT.bak
-rwxr-xr-x 1 sc-syncthing root              0 Sep 20  2017 LOCK
-rwxr-xr-x 1 sc-syncthing root         875581 Mar  7 11:41 LOG
-rwxr-xr-x 1 sc-syncthing root        1048720 Feb 22 20:17 LOG.old
-rw-r--r-- 1 sc-syncthing syncthing     12028 Mar  7 11:40 MANIFEST-648361

Is database reset only deleting all the above files?

It can’t be both not recreated and also full of database files being changed. You are being rather confusing.

But also keep in mind that what Syncthing uses as the database dir depends on the user it’s running under and the environment variables set and parameters. There is nothing to say that the database dir when running as a service under sc-syncthing is the same database dir it defaults to when you run it from the command line.

1 Like

On my Synology servers, Syncthing runs exclusively via the Synology DSM and there via the package center. I also stop and start Syncthing in the package center, if I do something via CMD. Autostart of Syncthing is also carried out via the Synology DSM.

There are no actions with CMD. Also I don’t have a second database directory.

What I have to doe?

Understand your setup and system, so that you know how Syncthing is started, what user it runs as and where its settings and database are. Admittedly that may not be totally easy on a Synology. Perhaps better experiment on a normal computer instead.

As I understood, that -reset-database will delete the folder /var/packages/syncthing/target/var/index-v0.14.0.db/, I made a backup of the content and delete manually all files in that folder.

After restarting of Syncthing the whole database is building new. This I make on both servers. This now needs a couple of hours and I come back after finishing.

I hope a solution is possible.

The above total reset works good. Both servers are actual now.