BitTorrent Sync (BTSync) Plugin


Recommended Posts

  • Replies 138
  • Created
  • Last Reply

Top Posters In This Topic

Thanks again Overbyrn,

 

Above update procedure worked for me!  :-)    (1.1.42 loaded and working)

 

Russell

Good to know.  I've updated the first post with link to the update instructions.  One day I'll try to find a better way to update from inside the plugin.

Link to comment
  • 2 weeks later...

Pushed some changes to the plugin.  Updated to v1.6.  Should show as an option to upgrade plugin from webgui settings page.

 

Changes:

  • Plugin now correctly detects remote version of the btsync application, meaning it no longer shows "Unknown" all the time.  Change should allow for plugin to detect when a new btsync version comes available thus offering the option to update from within the plugin.
  • Missing -C arg in tar syntax within btsync upgrade function.
  • Change logic used to determine if btsync application installed. Test for existence of btsync binary instead of installation directory.

 

Al fixes provided by forum member ikosa. 

 

Thanks ikosa!  :)

 

 

Link to comment
  • 2 weeks later...

Hi overbyrn,

I've been trying to install this plugin on a vanilla install of unRAID 5 rc16 by either copying the plg file into /boot/config/plugins and rebooting OR via telnet with wget.

 

With wget it gets as far as: Connecting to github.com (github.com)|204.232.175.90|:443... connected.

 

With the reboot method I end up with the icon image but it has a filesize of 0kb...

 

Soooo I'm guessing it's a permissions thing, but I'm curious to know if you have ever struck this before?

 

Thanks again for all your work!

 

Link to comment
  • 1 month later...

I've installed the plugin, and everything seems to be working.

 

However, I've set the "BTSync Location" to a user share, and now the disk concerned seems never to spin down. The parity drive also seems to be spun up.

 

Is it safe/a better idea/possible to put this "BTSync Location" on the boot USB flash drive - or is there some other way to keep the hard disks spun down (when not actually being used)?

Link to comment

I've installed the plugin, and everything seems to be working.

 

However, I've set the "BTSync Location" to a user share, and now the disk concerned seems never to spin down. The parity drive also seems to be spun up.

 

Is it safe/a better idea/possible to put this "BTSync Location" on the boot USB flash drive - or is there some other way to keep the hard disks spun down (when not actually being used)?

 

It's advisable not to install to flash drive as the increased level of file writes will dramatically cut down the life of the USB. 

 

Unfortunately, there's little that can be done as the nature of applications like BTSync mean it will always be active, resulting in the disk its installed to remaining in a spun state.  It's usually preferable to have a cache drive or drive that's mounted but not part of the array to install things like this onto.

Link to comment

It's advisable not to install to flash drive as the increased level of file writes will dramatically cut down the life of the USB. 

 

Unfortunately, there's little that can be done as the nature of applications like BTSync mean it will always be active, resulting in the disk its installed to remaining in a spun state.  It's usually preferable to have a cache drive or drive that's mounted but not part of the array to install things like this onto.

Can you not set folder_rescan_interval to a large value (say once a day). The bittorrent sync forum suggests that this is a backup catchall to default real time monitoring of file changes, and that setting this value in the conf file allows the disks to spin down.

 

Its not set by default in your default conf file, but setting it seems to work for me - at least as far as allowing the sleep. More testing is needed to see if 'syncs' work correctly.

Link to comment
  • 1 month later...

So found this and tried to install it. Seems to have installed just fine by following the github guide (i did the run the command...not the reboot method). Shows up in the menu page (i use simplefeatures). I can change settings but when i try to Start BTsync Daemon i get nothing. It just stays at Status : Not Started. When i do click start i get the small message on bottom lft of my screen. it says "starting BTSync.......ok!". Then it refreshes the page and its still Status: Not Started.

 

Th only thing in the log is this line after i click on the Start button

 

Nov 7 13:29:12 Tower sudo: root : TTY=unknown ; PWD=/ ; USER=nobody ; COMMAND=/usr/local/btsync/btsync --config /mnt/cache/apps/btsync/btsync.conf

 

 

Any ideas? Im a noob when it comes to unraid plugins lol

Link to comment

So found this and tried to install it. Seems to have installed just fine by following the github guide (i did the run the command...not the reboot method). Shows up in the menu page (i use simplefeatures). I can change settings but when i try to Start BTsync Daemon i get nothing. It just stays at Status : Not Started. When i do click start i get the small message on bottom lft of my screen. it says "starting BTSync.......ok!". Then it refreshes the page and its still Status: Not Started.

 

Th only thing in the log is this line after i click on the Start button

 

Nov 7 13:29:12 Tower sudo: root : TTY=unknown ; PWD=/ ; USER=nobody ; COMMAND=/usr/local/btsync/btsync --config /mnt/cache/apps/btsync/btsync.conf

 

 

Any ideas? Im a noob when it comes to unraid plugins lol

 

Try issuing the following from command line;

sudo -u nobody /usr/local/btsync/btsync --config /mnt/cache/apps/btsync/btsync.conf

 

and post what message/error you get back.  Does it look anything like below example;

root@Tower:~# sudo -u nobody /usr/local/btsync/btsync --config /mnt/cache/btsync2/btsync.conf

Storage path specified in config file does not exist.

root@Tower:~#

 

To see if there was a problem with btsync, I have just installed the plugin onto a test system.  Strangely I received the above error and in the gui, it presented the way you describe as under-the-hood it was failing to start.

 

If you do see the same error message as above, then try this;

mkdir -m 0777 /mnt/cache/apps/btsync/.sync
chown nobody:users /mnt/cache/apps/btsync/.sync

 

and then try to start the application.

 

Report back your findings please.  It's never been necessary to create this .sync sub-dir before, so perhaps something has changed in the current version of the btsync application that is downloaded during a fresh installation.

 

 

EDIT: I have pushed a change to the plugin to fix this issue.  If this is the error for you, then after doing the tests above, go to unRAID Gui ->BTSync plugin page where you should see it report an update to version 1.7 of the plugin is available.

 

 

Regards,

overbyrn

Link to comment

That was exactly the issue i had Overbyrn. Prior to updating i did everything you mentioned and it started up just fine. Updated and it started up just fine again.

 

Thanks!

 

Happy to hear you have it working now.  You did me a favour by making me look at the code yesterday as I also took the time to add some more settings to the plugin.

 

For anyone that's interested, I've added the following additional advanced settings to the plugin webgui config page.  Forum member sane mentioned in an earlier post that parameter "FOLDER_RESCAN_INTERVAL" may be helpful in allowing disks where btsync is in use to spin down.  Not totally sure and would need some testing, but it's now settable via the plugin whereas previously would have to be added to the config file manually.  Ditto for all of the other params listed below.

 

Settings Added:

FOLDER_RESCAN_INTERVAL

MAX_FILE_SIZE_DIFF_FOR_PATCHING

MAX_FILE_SIZE_FOR_VERSIONING

SYNC_MAX_TIME_DIFF

SYNC_TRASH_TTL

SEND_BUF_SIZE

RECV_BUF_SIZE

 

Version 1.8 of the plugin has been pushed to GitHub and should show up as an available update within the plugin settings page of the unRAID webgui.

 

 

Regards,

overbyrn

Link to comment

Thanks a lot for all you do with creating these plugins.

 

I think I found a bug with saving the "Sync Trash (days)" setting. Before I enabled any advanced settings, this option showed 30. Once I set one of the other advanced options, this setting went to 1000. Now I try to set it to something more sane like 60 and it always reverts back to 1000 days when I apply the changes.

 

Actually, this is happening to "Max Allowed Time Difference Between Devices (secs)" as well.

 

It seems what ever I set "Max File Size for Versioning (MB)" to is also applied to "Max Allowed Time Difference Between Devices (secs)" and Sync Trash (days)".

Link to comment

Actually, this is happening to "Max Allowed Time Difference Between Devices (secs)" as well.

 

It seems what ever I set "Max File Size for Versioning (MB)" to is also applied to "Max Allowed Time Difference Between Devices (secs)" and Sync Trash (days)".

Thanks for letting me know.  I'll take a look when I get a chance.  Probably borked a variable somewhere.

Link to comment

I think I found a bug with saving the "Sync Trash (days)" setting. Before I enabled any advanced settings, this option showed 30. Once I set one of the other advanced options, this setting went to 1000. Now I try to set it to something more sane like 60 and it always reverts back to 1000 days when I apply the changes.

Fixed.  I had indeed fat-fingered a couple of parameter values resulting in the wrong variables being assigned the wrong values.

 

Updated plugin to version 1.9 and pushed to github.  You should see an update available from within the plugin webgui settings page.  Please let me know if something is still not working right after the update.

 

 

Regards,

overbyrn

Link to comment

I'm on the latest app version and version 1.8 for the plugin.  Trying to update to 1.9 doesn't work as it says download failed, installation aborted.

 

Sent from my SM-N9005 using Tapatalk

Damn, I left in a commented piece of code during debugging.  I should have removed the comment prior to pushing out the update.

 

Due to the fact the issue is within the plugin update routine, it won't be possible to fix by doing an update from the plugin.  I've pushed the fixed plugin to my github page.  Please grab a copy and overwrite the plg file you have in your plugins dir on flash.  Then either reboot or manually install via "installplg /boot/config/plugins/btsync_overbyrn.plg".

 

That should put you on the latest v1.9 and future updates will continue to work as expected.

 

 

Regards,

overbyrn

 

Link to comment

I'm on the latest app version and version 1.8 for the plugin.  Trying to update to 1.9 doesn't work as it says download failed, installation aborted.

 

Sent from my SM-N9005 using Tapatalk

Damn, I left in a commented piece of code during debugging.  I should have removed the comment prior to pushing out the update.

 

Due to the fact the issue is within the plugin update routine, it won't be possible to fix by doing an update from the plugin.  I've pushed the fixed plugin to my github page.  Please grab a copy and overwrite the plg file you have in your plugins dir on flash.  Then either reboot or manually install via "installplg /boot/config/plugins/btsync_overbyrn.plg".

 

That should put you on the latest v1.9 and future updates will continue to work as expected.

 

 

Regards,

overbyrn

 

Will do.  But it's 1 AM in my place now lol, will install it in the morning.  Btw, your plugin has given me my own "unlimited dropbox" and I'm really grateful for that :D

 

Sent from my SM-N9005 using Tapatalk

 

 

Link to comment

Due to the fact the issue is within the plugin update routine, it won't be possible to fix by doing an update from the plugin.  I've pushed the fixed plugin to my github page.  Please grab a copy and overwrite the plg file you have in your plugins dir on flash.  Then either reboot or manually install via "installplg /boot/config/plugins/btsync_overbyrn.plg".

 

That should put you on the latest v1.9 and future updates will continue to work as expected.

Did this, and

[*]It's killed the setup, the shared folders, etc

[*]It seems impossible to stop the plugin now

[*]The folder refresh stuff isn't working either, meaning the disks can't be spun down

Not a great Sunday.

Link to comment

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.   Restore formatting

  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.