synocommunity Syncthing --reset-database

Dear all, I’m using the most recent Syncthing version from synocommunity on ma Synology NAS. I’ve some sync issues which seems can only be solved via database reset. May you can give me a hint how I can perform the --reset-database option on DSM?

Would be great if you can give me a hint. Thanks

The related code in service-setup.sh in the SPK package goes along the following lines:

SYNCTHING_CONFIG="--config=${SYNOPKG_PKGVAR} --data=${SYNOPKG_PKGVAR}"
SERVICE_COMMAND="${SYNOPKG_PKGDEST}/bin/syncthing serve ${SYNCTHING_CONFIG}"
export HOME=${SYNOPKG_PKGVAR}

I’m not quite sure about the exact location of the SYNOPKG_* variables, and they might be different based on DSM version. But they should all be somewhere under /var/packages/syncthing IIRC. Sorry, don’t have direct access to my Synology right now to look it up.

Roughly, this should work, save for any path adjustments:

export HOME=/var/packages/syncthing/var
/var/packages/syncthing/bin/syncthing --reset-database --config=${HOME} --data=${HOME}"

You must take care to gain the correct user permissions first. Probably first switch to root, or try running the command as the sc-syncthing user if the permissions are messed up.