Ataraxy
(Tom Hale)
August 24, 2017, 12:52pm
1
I copy all my household’s android devices’ backups via syncthing to my external HDD.
My backup HDD died, so I need to recreate the folders.
I’m getting messages for each folder such as:
Stopping folder "Ravidroid Internal" (ravidroid-internal) - folder marker missing
I really don’t want to remove and re-add numerous folders so that the .stfolder
is recreated.
In Recreate missing folder marker and rebuild folder content (raised by someone else), the issue/feature request was directed to the forum. I don’t believe it was raised here, so I’m doing it.
I have my the config, but have lost the sync directories and their .stfolders
.
Is there a way to safely recreate the folders:
without the tedium of removing and re-adding the configuration for each folder
telling syncthing not to propagate the empty folder to the other devices
2 Likes
calmh
(Jakob Borg)
August 24, 2017, 1:57pm
2
If this affected all folders on the affected device the safe way forward is syncthing -reset-database
. This will make it resync from a blank slate.
If it is only a subset of folders you need to manually remove and recreate them in the GUI, to clear out the index data for them.
1 Like
Ataraxy
(Tom Hale)
August 24, 2017, 3:20pm
3
So -reset-database
only has one -
?
It wasn’t all directories.
If I rename the ones I want to keep, then run this command, can I put back the copies I kept afterwards?
Or is the database stored outside of the folders being synced?
imsodin
(Simon)
August 24, 2017, 4:01pm
4
Yes that’s just one -
for long flags, that’s a Go thing.
Database is outside, you don’t need to rename anything. The downside of -reset-database
is that all folders will need to be rescanned fully. This is just resource intensive, but won’t do any “harm”. Recreating the folder is maybe less convenient, but won’t need a full rescan of all other folders.
Ataraxy
(Tom Hale)
August 25, 2017, 10:28am
5
Thanks guys.
For others, I:
Stopped the service
syncthing -reset-database
Started the service
This even created the missing .stfolders
for me.
1 Like
Ataraxy
(Tom Hale)
August 25, 2017, 10:39am
6
Would someone with access consider linking this page from the GitHub issue?
It’s locked to contributors only.
Ataraxy
(Tom Hale)
August 30, 2017, 4:40am
7
Ataraxy
(Tom Hale)
September 1, 2017, 10:05am
8
Future googlers: the potentially behaviour of creating .stfolder
s may change in future, see:
I’m in the process of documenting the behaviour of -reset-database .
I’m concerned that documenting the behaviour of a potentially dangerous side effect may not be the right long-term course of action. I’m still happy to do it in the short term, if it’s deemed appropriate though.
I have a few concerns with -reset-database or its REST equivalent:
It doesn’t follow the principle of least astonishment
It sounds like it only changes the database, but it changes sync folders also
It creates a .…
jeffmcneill
(Jeff Mcneill)
September 17, 2019, 3:48am
9
Hi folks, I’ve got this same issue, but on Android. Is there a command line or some other equivilent for that platform?
jeffmcneill
(Jeff Mcneill)
September 17, 2019, 4:05am
10
Nevermind, I’ve removed the shares and re-shared and re-enabled, etc. Data was preserved and files were re-created.
arxaoc
September 28, 2019, 6:07am
11
On an Android it helps to create .stfolder and restart syncthing with appropriate button in app.