Can Syncthing-Fork sync its own configuration?

I know there is an option to export the configuration, but I prefer an automated backup.

(/storage/emulated/0/Android/media/com.github.catfriend1.syncthingandroid is empty as I found out by syncing it)

Theoretically, yes, as the app can access its own folders. The path you need to find is not on user storage (i.e. /storage/emulated/0) but on the /data partition.

Just a tip, as I tried doing that in the past, make sure that the sync always goes one way only. Specifically, from the Android device to other devices, and that you don’t try editing the config file outside of Android and then syncing it back. This will mess with the file permissions, making the app unusable and requiring a fresh start.

Yeah, the database folder should definitely be ignored. Only config.xml and *.pem files are actually required for backup purposes.

1 Like

Indeed, my first attempt was to select the Syncthing-Fork’s directory in, I believe, /data/data. But I’m not able to ascend beyond /storage/emulated/0/ in the directory picker. Is there any trick?

And thanks for your suggestions to:

  • Sync one-way, from the phone away.

  • Only sync config.xml and *.pem. In fact, config.xml is all I care about.

I like how Obtainium does it: After every change, back up the configuration to a user-specified backup directory.

The picker won’t work. You need to input the full path manually via the Web GUI. I believe it will begin with something like /data/data/com.github.catfriend1.syncthingandroid/files.

That worked flawlessly. Thank you! It is good to know to always have a backup of my configuration.

Note that config.xml can at least in theory be recreated from your memory. The device ID is derived from the PEM files, which are cryptographically designed to not be reproducible. So unless you back them up as well, you will never reach the same configuration in your cluster after recovering the backup. All your other devices will need to accept and configure sharing for a new device ID.

From experience, my brain is not suitable as a backup medium.

OK, it doesn’t hurt to add: !*.pem

In general, I have my phone sync with my file server, and from there it syncs elsewhere. That keeps complexity in check.

2 Likes

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