BitTorrent Sync (BTSync) Plugin


Recommended Posts

Unfortunately I'm out of the plugin game.  Please use the BTSync plugin by Phaze. 

 

I recently put together a plugin for BitTorrent Sync as part of the original BitTorrent Sync forum thread here

 

Figured I should probably highlight this in the plugin design section of the forum.

 

Direct link to the plugin: https://github.com/overbyrn/UnRAID/raw/master/btsync_overbyrn.plg'>https://github.com/overbyrn/UnRAID/raw/master/btsync_overbyrn.plg

 

Full installation instructions on GitHub page @ https://github.com/overbyrn/UnRAID

 

 

As always, please feedback any issues found to this thread.  Also if you have any ideas for enhancements, fixes etc.

 

 

See this post for instructions for updating BTSync when later versions come out

 

 

Kind Regards,

overbyrn

Link to comment
  • Replies 138
  • Created
  • Last Reply

Top Posters In This Topic

overbyrn

This plugin is excellent and firstly thank you very much.

 

I have a small problem, it doesn't effect anything but I will be interested to see if others have it. Clicking the management link gives me this:

http://micro/gui

 

It should be:

http://micro:50001/gui

 

It did work originally but seems to have broken of late, certainly before 1.5

 

Also you may have covered this but how does the plugin handle new versions of the actual app?

Link to comment

overbyrn

This plugin is excellent and firstly thank you very much.

 

I have a small problem, it doesn't effect anything but I will be interested to see if others have it. Clicking the management link gives me this:

http://micro/gui

 

It should be:

http://micro:50001/gui

 

It did work originally but seems to have broken of late, certainly before 1.5

 

Also you may have covered this but how does the plugin handle new versions of the actual app?

I will try to recreate the port problem and let you know what I find.  As you say, will be good to hear if anyone else is having the same problem.

 

As for handling new versions of the application; I admit I have not given that too much thought at this time.  I'm pretty sure the URL the plugin uses to download BTSync will always grab the latest, so it's just a matter of figuring out a way to check local installed version vs online and if the online is later, offer to download and install.  I'll probably get a chance to look at it soon.  In the meantime, the best way would be to delete the file "btsync_i386.tar.gz" in /btsync plugin directory and re-run the installplg.  That will force the plugin to download BTSync fresh.  You shouldn't lose anything as re-installation won't delete existing config files.

 

 

Regards,

overbyrn

Link to comment

It's brorked again.

They updated BTSync and moved the install app.

 

The Newest Build:

http://syncapp.bittorrent.com/1.0.134/btsync_i386-1.0.134.tar.gz'>http://syncapp.bittorrent.com/1.0.134/btsync_i386-1.0.134.tar.gz

 

When you say borked, do you mean the link in the plugin is dead?

 

I've been trying to figure out a way to determine the online version of the application for version checking and upgrading , but at this time I don't see a way.  There appear to be two links in use that offer the download:

 

http://btsync.s3-website-us-east-1.amazonaws.com/btsync_i386.tar.gz '>http://btsync.s3-website-us-east-1.amazonaws.com/btsync_i386.tar.gz  (from the main download page)

and

http://syncapp.bittorrent.com/1.0.134/btsync_i386-1.0.134.tar.gz'>http://syncapp.bittorrent.com/1.0.134/btsync_i386-1.0.134.tar.gz (via their forum)

 

I think I may have to resort to scraping a URL to determine the version. 

 

eg.

 

wget http://btsync.s3-website-us-east-1.amazonaws.com -q -O -

<html>
<head><title>BitTorrent Sync Installer</title></head>
<body>
<h3>BitTorrent Sync version 1.0.132</h3>
Installer for Windows: <a href="BTSync.exe">BTSync.exe</a><br>
Installer for OSX: <a href="BTSync.dmg">BTSync.dmg</a><br>
Gzip archive for Linux: <a href="btsync_arm.tar.gz">ARM</a>  <a href="btsync_powerpc.tar.gz">PowerPC</a>  <a href="btsync_ppc_quoriq.tar.gz">PowerPC Quoriq</a> <a href="btsync_i386.tar.gz">i386</a> <a href="btsync_x64.tar.gz">x64</a> <a href="btsync_glibc23_i386.tar.gz">glibc23_i386</a> <a href="btsync_glibc23_x64.tar.gz">glibc23_x64</a>
<br>Gzip archive for FreeBSD: <a href="btsync_freebsd_i386.tar.gz">i386</a>  <a href="btsync_freebsd_x64.tar.gz">x64</a>
<br>User guide: <a href="BitTorrentSyncUserGuide.pdf">BitTorrentSyncUserGuide.pdf</a>
</body>
</html>

 

root@Tower:~# wget http://btsync.s3-website-us-east-1.amazonaws.com -q -O - | sed -e 's/<[a-zA-Z\/][^>]*>//g' | grep -i version | awk '{print $4}'
1.0.132

 

or

 

wget http://syncapp.bittorrent.com/1.0.134/ -q -O -

<html>
<head><title>BitTorrent Sync Installer</title></head>
<body>
<h3>Sync version 1.0.134</h3>
Installer for Windows: <a href="BTSync-1.0.134.exe">BTSync.exe</a><br>
Installer for OSX: <a href="BTSync-1.0.134.dmg">BTSync.dmg</a><br>
Gzip archive for Linux: <a href="btsync_arm-1.0.134.tar.gz">ARM</a>  <a href="btsync_powerpc-1.0.134.tar.gz">PowerPC</a>  <a href="btsync_ppc_quoriq-1.0.134.tar.gz">PowerPC Quoriq</a> <a href="btsync_i386-1.0.134.tar.gz">i386</a> <a href="btsync_x64-1.0.134.tar.gz">x64</a>  <a href="btsync_glibc23_i386-1.0.134.tar.gz">glibc23_i386</a> <a href="btsync_glibc23_x64-1.0.134.tar.gz">glibc23_x64</a><br>
Gzip archive for FreeBSD: <a href="btsync_freebsd_i386-1.0.134.tar.gz">i386</a>  <a href="btsync_freebsd_x64-1.0.134.tar.gz">x64</a>
</body>
</html>

 

root@Tower:~# wget http://syncapp.bittorrent.com/1.0.134 -q -O - | sed -e 's/<[a-zA-Z\/][^>]*>//g' | grep -i version | awk '{print $3}'
1.0.134

 

 

But I can't really rely on the second one as that URL is structured for only 1.0.134.  So have to assume it'll change in time.  The first URL shows 1.0.132, an earlier version - but I'm not sure it is as the CRC's are identical for both files in at the above locations.  So are dates, times and sizes.

 

 

 

Link to comment

First off thanks so much for this plugin.. installed well and setup easy, I just have one question and it might be the limits of btsync  on linux and nothing to do with unraid.  One of the directories I want to sync are going to be larger then any drive I have on my array.  A buddy and I want to share our video library's with each other and right now (after we combine them) we will have about 2.5 TB.  I have 3 2TB drives in my array and of course one is parity.  It would appear ( i just installed it on the unRAID box) that I have to pick a mount point and not a share on the array.  Is there something I might be missing and by doing it this way is the data still going to be protected by the parity drive? 

 

By pointing btsync at something like /mnt/disk2/somedir I can never get more data on it then the drive can hold correct?  Where as with a share from unRAID I could put 5 gigs into one dir with a 5 gig array spanned across 5 drives.  Am I correct in all this.

 

Thanks again

 

Naelr

Link to comment

@Naelr

 

Have you setup an array? If so then have you setup a share? In its basic setup a share will span (can make use of) all the combined hard drives space.

If this is all setup correctly then its about when you point the BTSync share.

/mnt/disk2 will point it direct to the disk and will limit you.

Shares are available from /mnt/user/

 

So if your share is say named "movies" you would probably point BTSync to:

/mnt/user/movies

 

Not sure if I am reading your post correctly but hopefully that helps.

Link to comment

@Naelr

 

Have you setup an array? If so then have you setup a share? In its basic setup a share will span (can make use of) all the combined hard drives space.

If this is all setup correctly then its about when you point the BTSync share.

/mnt/disk2 will point it direct to the disk and will limit you.

Shares are available from /mnt/user/

 

So if your share is say named "movies" you would probably point BTSync to:

/mnt/user/movies

 

Not sure if I am reading your post correctly but hopefully that helps.

 

I wasn't aware that the shares were mounted as well ... I found it and that is exactly what I was looking for.... Thanks much.. I guess after I think about it, it would have to be mounted somewhere... don't I feel like a bit of a jackass... 

 

Thanks again Dimtar!

 

Naelr

Link to comment

I have it working, howerver I cannot access the web gui with chrome or IE. Loading Firefox worked for me. It could be this particular pc has issues.  I get a Invalid request message when trying to use Chrome.

 

When you gt the invalid request, can you copy and paste the URL the plugin is trying to send you to please?

Link to comment

I have it working, howerver I cannot access the web gui with chrome or IE. Loading Firefox worked for me. It could be this particular pc has issues.  I get a Invalid request message when trying to use Chrome.

 

When you gt the invalid request, can you copy and paste the URL the plugin is trying to send you to please?

 

http://tower:50001/gui.

 

Sorry there goes my theory. :(

Link to comment
  • 2 weeks later...

1.1.12
Improved memory and CPU usage when working with many files;
Improved transfer speed for small and medium files;
Do not create metadata file for each file in shared folder, now all metadata is stored in single database file;
Do not read .SyncID every second. Now it should be checked only when some file event occurs (should allow hard drive to sleep);
When file path can not be created on target OS (incompatible file system characters), it will be skipped from sync;
Added option to configure rescan time;
Various bugfixes.

 

Love the idea that it should allow hard drive to sleep now, can anyone confirm if this is the case as that's what kept it off my server.

Link to comment

 

There's a new BTSync release 1.1.12 that introduces massive changes.

 

Thread: http://forum.bittorrent.com/topic/19228-latest-sync-build-1112/

 

Link: http://syncapp.bittorrent.com/1.1.12/

 

What line do I need to change in the PLG file to install the latest release?

 

Thanks.

 

The btsync developers seem not to make it easy to automate an upgrade. 

 

They have a general download URL of http://btsync.s3-website-us-east-1.amazonaws.com/btsync_i386.tar.gz which offers the latest stable, and then unique URLs for beta versions announced in their forum.  eg. http://syncapp.bittorrent.com/1.1.12/btsync_i386-1.1.12.tar.gz

 

This makes it hard to write a way to upgrade from within the plugin.

 

For now, here's a working way of upgrading :-

 

  • Stop BTSync from the WebGui settings page
  • Rename (or delete) "btsync_i386.tar.gz" found at /boot/config/plugins/btsync
  • Download this file... http://syncapp.bittorrent.com/1.1.12/btsync_i386-1.1.12.tar.gz.  Save or copy it to /boot/config/plugins/btsync directory
  • Rename btsync_i386-1.1.12.tar.gz to btsync_i386.tar.gz
  • Reboot or manually from command line re-install the btsync plugin.  eg. installplg /boot/config/plugins/btsync_overbyrn.plg
  • Go to WebGui settings page.  Verify local application version is 1.1.12
  • Start BtSync

 

The above steps should work for any similar future updates, until I can come up with a way to do it from inside the plugin.

 

 

Link to comment
  • 2 weeks later...
  • 2 weeks later...

Any idea why the settings page would say Not Installed for the BTSync Application, even though it is installed and running? Whenever I press Install, it says OK at the bottom and refreshes but nothing changes.

 

any idea about this issue?

Link to comment

Any idea why the settings page would say Not Installed for the BTSync Application, even though it is installed and running? Whenever I press Install, it says OK at the bottom and refreshes but nothing changes.

 

any idea about this issue?

The plugin decides "Installed" vs "Not Installed" based only on whether it detects if the installation directory exists.  The assumption being that if your target install directory does not yet exist, then the BTSync application has yet to be installed.  Perhaps there is something which is confusing the logic of the directory existence check. 

 

What is the installation directory as you have it set in the BTSync gui settings page?

 

 

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.