How To Restart Btsync Correctly With Config File (Linux)


aduermael

Recommended Posts

Hi, 
 
I've been working on a little project lately. 
Basically I just run btsync with a configuration file.
 
But if I kill the process and update the configuration file (adding / removing shared folders), I get errors when restarting:

[20141217 01:46:09.646] SF[0087]: Loaded folder /sync2[20141217 01:46:09.646] Error while adding folder /sync2: Selected folder is already added to BitTorrent Sync.

Before, I used to remove .SyncID, but apparently this file is not being used anymore. 
 
I now have a  .sync folder in the shared folder containing:

ArchiveIDIgnoreListStreamsList

And another .sync folder in /usr/bin, containing:

8364B97367EEAC9418FB7B0FB1E45C80D1C92970.availability8364B97367EEAC9418FB7B0FB1E45C80D1C92970.dbhistory.dathistory.dat.oldsync.datsync.dat.oldsync.pidsettings.datsettings.dat.old

I tried to clean everything, removing both .sync folders. 
It works but it's then considered as a brand new peer as you can see:
 
8QLJpPc.png
 
I would like to clean everything but keep the peer identity if possible. 
 
What files should I remove?
Any other instructions I should follow?
 
Thanks!

Link to comment
Share on other sites

@aduermael

Please ignore messages "Error while adding folder /sync2: Selected folder is already added to BitTorrent Sync." when adding folders via config file.

Actually, when you follow the pattern "stop sync -> edit config -> start sync" is there any functional issues except the messages in the log? (As I understand the "new identity" issue pops up when you clean up the /usr/bin folder)

Link to comment
Share on other sites

I don't see any functional issues yet, just the message. 

And yes, the new identity pops up only when I clean up the storage folder (/usr/bin/.sync by default in my case)

I'll do more tests. 

 

Actually I was worrying about folders that wouldn't stop syncing if I remove them from the config.

As they are kept, registered somehow in the .sync folder files.

 

I'll run these tests:

- Remove a folder from the config and restart

- Update a secret key for some folder in the config and restart

- Re-add folders that were removed and restart

 

I'll tell you about the results! 

 

Thanks!

Link to comment
Share on other sites

@aduermael

 

Every time Sync parses the json config file, it saves parsed results to internal config format. So indeed, all the folders are saved internally. Though, when you remove folders from json and start sync again with --config - it should remove folders from internal config as well.

 

Note, that you have to remove folders from json config file, removing them in WebUI is not going to work.

Link to comment
Share on other sites

Hi, 

 

Ok I did these 3 tests:

- Remove a folder from the config and restart

- Update a secret key for some folder in the config and restart

- Re-add folders that were removed and restart

 

And it works like a charm!  :)

 

@aduermael

 

Note, that you have to remove folders from json config file, removing them in WebUI is not going to work.

 

 

I'm not using te webUI at all, so I had no issues. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.