Dropbox Plugin for unRAID 5b11+ (updated)


Recommended Posts

Thanks guys I will check out  selective sync further. Just to be clear im trying to achieve a one way sync from unraid to dropbox.

 

Feature request - Any chance of adding in the option to select/unselect the top level folders that are synchronised in the webgui plugin?

 

Sent from my GT-I9300 using Tapatalk 2

 

Link to comment
  • Replies 245
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Ok one other question, I would like to sync a folder that already contains files, I don't want to duplicate the files by copying them to the dropbox data folder so can I do some sort of symbolic link, if so what would be the command?

 

Sent from my GT-I9300 using Tapatalk 2

 

 

Link to comment
  • 3 weeks later...

Two days with Dropbox plugin - it's driving me crazy.

 

I did download the plugin file dropbox_overbyrn.plg of size 23578 two days ago.

 

The installation process was straight forward. I didn't change anything. I did register with Dropbox successfully and the Web-GUI shows "... sync 35,000 files, 3hours ... LAN sync ...".

 

After an hour I looked at the machine and there were thousands of directories created. Not one single file - just directories.

 

* Delete of the directory tree from my Windows machine didn't work --> hung.

 

* Attached LCD and keyboard to my headless Tower. Telnet, open MC and F8 --> hung. From that point on Web-GUI was no longer available. Had to hard-reset my Tower (10 hours parity check).

 

* After parity check and delete of plugin the direcory tree is still there. rm -R /mnt/disk1/Dropbox/ --> hung. Hardreset, parity check, argghhhh!!!

 

What is this? I do have a trashed Dropbox directory tree with thousands of directories I can't delete (not from Windows, not local with MC or rm).

 

 

Any help is highly appreciated.

 

Regards

Harald

 

Link to comment

Two days with Dropbox plugin - it's driving me crazy.

 

I did download the plugin file dropbox_overbyrn.plg of size 23578 two days ago.

Where did you get the link for the above plug-in?  I've not updated the first post to advise this version is publicly available yet.  I'm still developing it.  Although I've tested it here and it's correctly sync'd with my dropbox.  Admittedly I don't have 35,000 files.  But it did 6,244 just fine.

 

What is this? I do have a trashed Dropbox directory tree with thousands of directories I can't delete (not from Windows, not local with MC or rm).

For whatever reason, it appears you have hit a limit whereby client PC's such as your Windows box on the lan and locally with MC or rm are struggling to access or remove the sheer number of directories created.

 

Question:when you issue the rm command, do you get an error message (even eventually)?

 

If you get an error saying to many arguments, you could try removing the files using find and xargs:

 

find . -name '*' | xargs rm

NB: Be in /mnt/disk1/Dropbox when you issue the above command!

Link to comment

Thanks for your answer.

 

Where I got your plugin from? From your GitHub site here: https://github.com/overbyrn. I found this site when installing your openSSH plugin. In the first post of the "OpenSSH Plugin & companion Plugin DenyHosts for unRAID 5b11+ (NEW 29-Mar-2013)" you mention this page. There I found all your plugins and did download your Dropbox plugin from there. Did I grab a wrong release?

 

rm and MC just hang when issued. I don't receive an error - they just hang. If I try to kill them the machine becomes unresponsible - nou Web-GUI no Telnet, nothing. Hardreset is the only option then. I see thousands of directories with the same name building a huge directory struct. Seems that is the reason why I can't navigate into it or delete it.

 

Seems that there's no way to get rid of this directory struct.

 

Regards

Harald

 

Link to comment

Where I got your plugin from? From your GitHub site here: https://github.com/overbyrn. I found this site when installing your openSSH plugin. In the first post of the "OpenSSH Plugin & companion Plugin DenyHosts for unRAID 5b11+ (NEW 29-Mar-2013)" you mention this page. There I found all your plugins and did download your Dropbox plugin from there. Did I grab a wrong release?

Yes and No.  You catch me in a transition between current plugin design and location (my dropbox), to hosting all plugins on GitHub and whilst doing this, taking the opportunity for code re-writes where I think necessary.  For OpenSSH, I've reworked the plugin hugely, but for Dropbox not so much.  In fact the version you downloaded is practically a 1:1 of the latest one linked to the first post on this thread.  All I did was pretty up the gui and build in a plugin update routine.

 

rm and MC just hang when issued. I don't receive an error - they just hang. If I try to kill them the machine becomes unresponsible - nou Web-GUI no Telnet, nothing. Hardreset is the only option then. I see thousands of directories with the same name building a huge directory struct. Seems that is the reason why I can't navigate into it or delete it.

 

Seems that there's no way to get rid of this directory struct.

We need to get rid of that directory before going any further.  Did you try the command I mentioned in my last message?  Make sure you do not have dropbox running before you issue the command as by the sounds of it, it may be continually creating directories.  Also make sure you rename the plg file to another extension or move it out of your plugin directory.  In case you have to do a hard reset, there's no point allowing it to reinstall at this time.

 

If you are comfortable using command line, check your process list for any sign of dropbox daemon running.  Although the plug-in gui page should do the trick, it never hurts to double check when troubleshooting.

 

ps -ef | grep dropbox-dist | grep -v grep

 

kill it if you see a process returned and then try running the find / xargs command.

 

 

 

Regards,

overbyrn

Link to comment

Sorry for this delay - I had to wait for the parity sync to complete.

 

With the commands you showed I could manage to remove these .dropbox/Dropbox directories. Thanks a lot.

 

In some posts here I found people telling about recursive directories and the hint to rename the directories (e.g. ".DropboxDatabase", "DropboxData"). Is this required?

 

What's the current state of your plugin. Do you consider it as stable?

 

Thanks

Harald

 

Link to comment

With the commands you showed I could manage to remove these .dropbox/Dropbox directories. Thanks a lot.

 

In some posts here I found people telling about recursive directories and the hint to rename the directories (e.g. ".DropboxDatabase", "DropboxData"). Is this required?

 

What's the current state of your plugin. Do you consider it as stable?

 

Excellent.  Glad the command worked.

 

I've systematically failed to hit the recursive directory problem others have reported so I'm not sure what best to advise.  Strictly speaking the directory names shouldn't matter one bit.  Feel free to experiment. 

 

FWIW, my dirs are:

 

WEl77cr.png

 

 

The GitHub version you have is stable for me.  I've had it running on my main UnRAID system for a few days.  No issues with it so far.

 

 

Regards,

overbyrn

Link to comment

I swapped from the GitHub version to the 0.4 release from the first post here in this thread. The GitHub version always blocked the Array because of used disks. I had to kill at least the dropbox process and a phyton process to get the Array come down successfully.

 

My directories with this 0.4 version are:

 

  • /mnt/disk1/.dropboxDatabase/
  • /mnt/disk1/Dropbox/

 

Sync is currently transferring files. But what I can tell for sure:

 

* I can't open the Dropbox directory from my Windows 8 boxes. I get a premission denied always. Permissions for both directories are as follows:

 

45 1 drwx------  3 nobody users 576 2013-03-31 18:24 .dropboxDatabase/
46 1 drwx------ 16 nobody users 480 2013-03-31 16:00 Dropbox/


 

* I didn't try to Stop the Array. This 0.4 release will not block the Array to come down, I hope.

 

I didn't go thru this thread completely, will do now. Any tipps for this permission problem? BTW, I'm on RC12a.

 

Regards

Harald

 

Link to comment

I swapped from the GitHub version to the 0.4 release from the first post here in this thread. The GitHub version always blocked the Array because of used disks. I had to kill at least the dropbox process and a phyton process to get the Array come down successfully.

 

My directories with this 0.4 version are:

 

  • /mnt/disk1/.dropboxDatabase/
  • /mnt/disk1/Dropbox/

 

Sync is currently transferring files. But what I can tell for sure:

 

* I can't open the Dropbox directory from my Windows 8 boxes. I get a premission denied always. Permissions for both directories are as follows:

 

45 1 drwx------  3 nobody users 576 2013-03-31 18:24 .dropboxDatabase/
46 1 drwx------ 16 nobody users 480 2013-03-31 16:00 Dropbox/


 

* I didn't try to Stop the Array. This 0.4 release will not block the Array to come down, I hope.

 

I didn't go thru this thread completely, will do now. Any tipps for this permission problem? BTW, I'm on RC12a.

 

To fix the permissions problem, issue the command

chmod -R 755 /mnt/disk1/Dropbox

 

Then test by dropping new files to the dropbox location on unraid as well as open a few files to check all is well from your Windows box.

 

I have a few things to add to the plugin including a dropbox update routine so that I can make sure the plugin keeps the dropbox version up to date.  Also I am adding an option to choose between the latest stable and latest experimental dropbox versions. That, plus file exclusion option from the webgui is top of the list. Once that's done (hopefully tomorrow) I'll test the new version to within an inch of its life.  The info you've given should help me where that's concerned.

 

 

Link to comment

Thanks.

 

chmod -R 755 /mnt/disk1/Dropbox

 

Seems that it is only the Dropbox folder itself that has the permission restricted:

 

root@Tower2:/mnt/disk1# ls -lisa
total 2
  2 0 drwxrwxrwx  7 nobody users 160 2013-03-31 15:58 ./
873 0 drwxr-xr-x 17 root   root    0 2013-04-01 10:09 ../
45 1 drwx------  3 nobody users 576 2013-04-01 10:24 .dropboxDatabase/
46 1 drwx------ 16 nobody users 480 2013-04-01 10:16 Dropbox/
  4 1 drwxrwxrwx 23 nobody users 552 2013-03-29 20:18 Filme/

 

root@Tower2:/mnt/disk1# ls -lisa Dropbox/
total 21
46 1 drwx------ 16 nobody users  480 2013-04-01 10:16 ./
  2 0 drwxrwxrwx  7 nobody users  160 2013-03-31 15:58 ../
604 4 -rw-r--r--  1 nobody users   29 2013-04-01 10:16 .dropbox
602 0 drwxr-xr-x  3 nobody users   80 2013-04-01 01:51 .dropbox.cache/
608 1 drwxr-xr-x 40 nobody users  960 2013-03-31 15:59 Bilder/

 

I think the -R option with the chmod is not neccessary.

 

Regards

Harald

 

 

EDIT:

 

After playing some time it seems that there's something buggy around permissions.

 

From my Windows machines I do connect to the shares with my local user (hawi). This user is a user in unRAID as well.

 

1.) I copied a file from Windows into one of the Dropbox subfolders (\\Tower\disk1\...).

 

1a.) This file was ***not*** synced from the unRAID machine to Dropbox.

 

1b.) Permission of this file was:

 

122517    4 -rw-rw-rw- 1 hawi   users    3892 2011-12-20 11:48 RemoveBadID2Tags.pl

 

2.) After I found out that there's only a one-way sync (this is ok for me) I tried to delete that same file from Windows (same machine, same session, even same open Explorer Window).

 

2a.) This did result in Permission denied. What the hell. It's the same user. Thought something should be holding that file:

 

lsof | grep -i Remove

 

Hmm? Nothing is holding that file.

 

2b.) rm did work.

 

3.) Copied a file to my Dropbox account on a Windows machine.

 

3a.) That file was synced to the unRAID box immediately.

 

3b.) The permissions of that file were:

 

122517    4 -rw-r--r-- 1 nobody users    3892 2011-12-20 11:48 RemoveBadID2Tags.pl

 

3c.) I could delete that file on either machine.

 

 

Link to comment

EDIT:

 

After playing some time it seems that there's something buggy around permissions.

 

From my Windows machines I do connect to the shares with my local user (hawi). This user is a user in unRAID as well.

 

1.) I copied a file from Windows into one of the Dropbox subfolders (\\Tower\disk1\...).

 

1a.) This file was ***not*** synced from the unRAID machine to Dropbox.

 

1b.) Permission of this file was:

 

122517    4 -rw-rw-rw- 1 hawi   users    3892 2011-12-20 11:48 RemoveBadID2Tags.pl

Am trying to get to the bottom of the permission problem.  Bit more information needed... can you tell me what security you have set for the user / dropbox share?  I do not have users configured, so need to understand how you configure your windows & unraid system so that I can do the same here.

 

 

Thanks

Link to comment

* The "Dropbox" Share is set with "Security=Public" and "Exported=Yes" in unRAID. The share is restricted to disk1. No cache drive.

 

* The user "hawi" is set as a regular user in unRAID.

 

If I connect to a unRAID box from my Windows 8 machines there are two possible options:

 

* I create a Windows drive and use that user hawi and his password.

 

* I do not use that drive and use UNC names instead (\\Tower\Dropbox or \\Tower\disk1\Dropbox).

 

 

Link to comment

Thanks for the additional info.  I have done some further testing and discovered some interesting things.

 

I set about checking the directory and file permissions of both Dropbox and Dropbox database locations at each step of the process.  Here's what I found;

 

After Install & Initial Start:

------------------------------

root@Tower:/mnt/disk1# ls -la

drwxrwxr-x 2 nobody users  48 2013-04-02 07:18 Dropbox/

drwxrwxr-x 2 nobody users  48 2013-04-02 07:18 DropboxDB/

 

After Initial Start, Before Issued Activation Link:

---------------------------------------------------

root@Tower:/mnt/disk1# ls -la

drwxrwxr-x 2 nobody users  48 2013-04-02 07:18 Dropbox/

drwx------ 3 nobody users 256 2013-04-02 07:20 DropboxDB/

 

After Issued Activation Link, Before Confirming Activation:

-----------------------------------------------------------

root@Tower:/mnt/disk1# ls -la

drwxrwxr-x 2 nobody users  48 2013-04-02 07:18 Dropbox/

drwx------ 3 nobody users 256 2013-04-02 07:20 DropboxDB/

 

After Successful Activation:

----------------------------

root@Tower:/mnt/disk1# ls -la

drwx------ 6 nobody users 176 2013-04-02 07:27 Dropbox/

drwx------ 3 nobody users 536 2013-04-02 07:27 DropboxDB/

 

So it would seem, two things happen;

[*]The permissions of the dropbox database location changes after initial install.  In the plugin, this would be immediately before and after pressing Enable or Start buttons

[*]After activation link is visited in browser and dropbox linked to an account, Dropbox application than changes the permissions of Dropbox data location.

 

Why it does this is a mystery and since I can't look inside the inner workings of the dropbox binary, there's not much to be said.

 

After I did the above tests, I used your information to create a user (test) in UnRAID.  This same username was also created my Win7 box.  The same password was set for both.  I then set-up a user share called Dropbox which relates to /mnt/disk1/Dropbox in the dropbox plug-in settings.  I also specified it to only be disk1.  Share is public and exported.  So at this stage I have mainly mirrored your config I think.

 

I then created a mapped drive from Win7 box to \\tower\Dropbox and specified user "test" and password.  It mapped the drive but instantly said access denied.  The same error occurs if mapping to \\tower\disk1\Dropbox.  So does not matter if direct to disk num or Unraid user share.

 

I then changed the permission of just the root Dropbox directory from command line:

chmod 770 /mnt/disk1/Dropbox

Changing perms from "drwx------" to "drwxrwx---"

 

I was then able to access the dropbox share from my Win7 PC and I could open a file already in dropbox directory, modify and save it.  So proving read/write access from Win7.  I copied a file from local Win7 disk to mapped dropbox share.  The file got created on Unraid and it was set correctly as the same user "test".  I uploaded a small file from Win7 pc to Dropbox website.  The file immediately showed up on Unraid dropbox.

 

Everything works as long as the UnRAID Dropbox data directory permissions are relaxed.

 

It would appear that this needs to be done immediately after the initial activation has taken place.  What I next need to consider is how.

 

In the meantime, if you "chmod 770 /mnt/disk1/Dropbox", then all should be well your end?

 

 

Regards,

overbyrn

Link to comment

After Successful Activation:

----------------------------

root@Tower:/mnt/disk1# ls -la

drwx------ 6 nobody users 176 2013-04-02 07:27 Dropbox/

drwx------ 3 nobody users 536 2013-04-02 07:27 DropboxDB/

I didn't check until after activation but this is what I saw also. I did chmod 777 on my system to fix it.

 

For my purposes it doesn't really matter though. I don't expect to really need to access this folder from outside unRAID. I will let NZBGet grab NZBs and Transmission grab torrents from there. I will have the rsync script you gave me write the logs there so I can examine them from my Windows Dropbox after it sends me the completion email. Maybe some other things I haven't thought of yet but as long as it is able to successfully sync both ways to my Windows machines then the files on it should be in my Windows Dropbox folder and I can just access them there.

 

Link to comment
  • 4 weeks later...

updated to 1.2 and files only seem to be syncing one way.  from dropbox to unraid not from unraid to dropbox.  everything installed fine i even did a clean install and removed db info and everything was recreated.

 

 

 

 

another issue i had is that i wasnt able to update the plugin inside unraid.  (from 1 to 1.2)

Link to comment

updated to 1.2 and files only seem to be syncing one way.  from dropbox to unraid not from unraid to dropbox.  everything installed fine i even did a clean install and removed db info and everything was recreated.

 

went back to 1.0 and am currently testing.

 

 

another issue i had is that i wasnt able to update the plugin inside unraid.  (from 1 to 1.2)

Two way working here with v1.2 of the plugin and v2.0.8 dropbox application.

 

What version of dropbox does the plugin report you are running?

How are you adding files to unraid dropbox location?  ie. for me, I see dropbox share on unraid from Win7 pc, create an empty text file and instantly see dropbox on my Win7 pc indicate it is syncing the new file.

Happy to help more if you can think of any other info you can provide that'll help me help you.

 

 

Regards,

overbyrn

Link to comment

 

What version of dropbox does the plugin report you are running?

How are you adding files to unraid dropbox location?  ie. for me, I see dropbox share on unraid from Win7 pc, create an empty text file and instantly see dropbox on my Win7 pc indicate it is syncing the new file.

 

Regards,

overbyrn

 

the only folder that seems to be syncing both ways is the Camera Uploads folder.  i deleted everything and am trying to see what is causing it.  The status is Idle currently.

 

dropbox_settings.JPG

 

 

Link to comment

I confirm that new version don't work. Just hang during downloading files, and after that I can't go to dropbox folder (even locally with midnight commander).  Stop old ver of plugin, delete old plugin file, delete database and data folders, then reboot and install manually new plugin, stay all settings by default, start plugin from gui, authorise it in dropbox, some time after that dropbox hangs during downloading files. I don't know what the purrpose of that behavior, maybe dropbox is the reason.

Try to return to ver 0.4

Link to comment

I have a watch folder in my Dropbox used by Transmission and NZBGet. When I put torrent or NZB files in that folder on my Windows machines those apps on unRAID pick them up and then update the extension which then gets changed on my Windows Dropbox.

 

So definitely working both ways for me.

 

Tapatalk from CM10.1 Kindle

 

 

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

mine is saying i have an update:

 

Dropbox Build / Plugin	Local Version	Online Version
Dropbox Version	        v2.0.22	        v2.0.8

 

that doesnt seem right

 

mine is also only syncing one way

 

Don't understand how you are running v2.0.22.  You appear to be running a version of dropbox that the plugin does not install.

 

My plugin installs:

 

v2.0.8 - if running the "stable" branch

v2.1.12 - if running the "experimental" branch.

 

Both versions are downloaded from my dropbox from within the plugin, so it should only ever be those versions until I choose to update this.

 

From the information you provide, I assume you have the plugin setup for stable and since it has done a check to see that your local installed version v2.0.22 is different from the known stable v2.0.8, it's offering the option to update.  I did not include logic in the plugin to determine if one version number is higher or lower than another as it should never matter.

 

As for one way sync, I'm sorry I have no advice.  I have never encountered it only doing one way on my live system or ever during any of the development.  There's support from others in this thread to say it also works for them, so I can only assume it's something specific to your configuration.

 

Link to comment
Guest
This topic is now closed to further replies.