Restoring all content from Linux PC back to Formatted new Android Phone

There havent been that many posts about restoring back content which has been synced before a Phone was formatted or cleaned up, or a brand new phone. Basically, i just need to confirm the correct ways to do this.

ST syncs data between the PC and phone with a number of different folders, some being Send&Receive on both devices, some being Send-Only from Phone, some being Receive-Only on Phone.

So far i have come up with 2 options, but i also have some questions.

Restore Option 1: I like to use Titanium Backup to backup ST.

  • When i restore ST from Titanium backup on my new phone, lets assume the folder paths are all the same. it will say .stfolder missing in all folders.
  • Before i create .stfolders in the relevent folders, i go ahead and change each folder to Receive Only and on my PC i leave it as is, namely Send&Receive.
  • I then might see “override changes” in one of the devices, and click that button, and watch everything go back on my phone
  • After that folder synchronizes fully, i then go ahead and change the folder setting on my phone back to whatever it was, for eg. Send&Receive and press Apply.

Question:

  1. Does this mean that the index gets backed up as well during a titanium backup?
  2. Is this ok to do? or will changing the setting on my Phone back to Send&Receive not really be “true” anymore for future syncs?
  3. Is it “allowed” to change the “Folder Type” under Advanced Settings of the folder? Or does constantly doing this mess things up??

Restore Option 2: I saw a post on here where a user mentions doing this type of procedure here: Question - Restoring config on Android , but by backing up and restoring the Configs of ST ONLY, meaning going into the ST settings and doing a manual backup there, instead of doing a Titanium Backup.

Question:

  1. Leaving the ST “Folder Type” settings on both devices as-is, how sure are you that the index is set to 0 and that the files on my PC wont get deleted because my phone’s folders are empty?
  2. Would it complain that i need to create .stfolders as well inside the new Phone’s folders?
  3. Is this a better option to choose for restoring the files as they are on my PC ?

It just feels like by choosing Option 1, that i will be MORE sure that the files wont be deleted from the PC, as i making sure that i am changing the “Folder-Type” and forcing files to go on my Phone instead. That feels like a safer option, Whereas Option 2 i have the feeling some delta indexes or future indexes might exist somewhere and then might mess everything up. or am i wrong?

Id love to hear your opinions on this and how you think is the best way to do it.

Also, thank you for this great software.

I cannot answer all the questions in detail, but I can only say that it is totally fine to switch folder types. In your case, I would change everything to “Receive Only” before even attempting to connect and synchronise with other devices.

As for Titanium Backup, it backs up the Syncthing folder from /data/data, which does contain the database (i.e. the index-v0.14.0.db folder). As long as you set your folders to “Receive Only” before attempting synchronisation, I would say that it should not really matter whether the old database is there or not.