ken-ji Posted March 3, 2019 Author Share Posted March 3, 2019 Definitely not using the GUI, but it should be ok if the SSD is an unassigned device Quote Link to comment
jowi Posted March 11, 2019 Share Posted March 11, 2019 I've added a USB stick using the unassigned devices plugin, formatted it as EXT4, pointed the docker to it and voila, dropbox is now running Since Dropbox is constantly synced between all different devices, i don't need it to persists on the array anyway, but it is nice to have acces to it from within UNRAID. Quote Link to comment
itimpi Posted March 11, 2019 Share Posted March 11, 2019 4 hours ago, jowi said: I've added a USB stick using the unassigned devices plugin, formatted it as EXT4, pointed the docker to it and voila, dropbox is now running Since Dropbox is constantly synced between all different devices, i don't need it to persists on the array anyway, but it is nice to have acces to it from within UNRAID. Interesting! That suggests that another solution might work would be be to create a file on the array or cache, and then mount it as a loopback device and format that as EXT4. I might try that Quote Link to comment
jowi Posted March 11, 2019 Share Posted March 11, 2019 Yes, i've read about that construction as well, but my unix knowledge is not very good... but that would be an even better solution please post a step-by-step instruction if you get it working! Quote Link to comment
ken-ji Posted March 11, 2019 Author Share Posted March 11, 2019 1 hour ago, itimpi said: That suggests that another solution might work would be be to create a file on the array or cache, and then mount it as a loopback device and format that as EXT4. Wondering why I didn't think of this.... 6 hours ago, jowi said: I've added a USB stick using the unassigned devices plugin, formatted it as EXT4, pointed the docker to it and voila, dropbox is now running This is a great Idea too... for most users (unless your on teams or the pro Dropbox account) a USB stick is more than enough. Just make sure to use a good stick as you don't want corruptions from propagating back to your copies. Quote Link to comment
CHBMB Posted March 11, 2019 Share Posted March 11, 2019 1 hour ago, itimpi said: Interesting! That suggests that another solution might work would be be to create a file on the array or cache, and then mount it as a loopback device and format that as EXT4. I might try that Alan Pope from Ubuntu used that method in a blog post here. Quote Link to comment
itimpi Posted March 12, 2019 Share Posted March 12, 2019 10 hours ago, CHBMB said: Alan Pope from Ubuntu used that method in a blog post here. Thanks. I followed that blog post as it has nice detailed steps and have Dropbox functioning again on my Unraid server Quote Link to comment
jowi Posted March 12, 2019 Share Posted March 12, 2019 I assume you changed the DROPBOXFILE="$HOME"/.dropbox.img etc to some other location? Quote Link to comment
jowi Posted March 12, 2019 Share Posted March 12, 2019 (edited) I can't get that script to work at all. I put it in a .sh file, but it crashes on the empty lines, if i remove these, i get errors like: dd: invalid number: ‘10G\r\r’ etc... How do you run this? # Location of the image which will contain the new ext4 partition DROPBOXFILE=/mnt/cache/Dropbox/.dropbox.img # Current location of my Dropbox folder DROPBOXHOME=/mnt/disks/SanDisk32GUSB/Dropbox # Where we will copy the folder to. If you have little space, you could make this # a folder on a USB drive DROPBOXBACKUP=/mnt/cache/Temp/old_Dropbox # What size is the Dropbox image file going to be. It makes sense to set this # to whatever the capacity of your Dropbox account is, or a little more. DROPBOXSIZE="10G" # Create a 'sparse' file which will start out small and grow to the maximum # size defined above. So we don't eat all that space immediately. dd if=/dev/zero of="$DROPBOXFILE" bs=1 count=0 seek="$DROPBOXSIZE" # Format it ext4, because Dropbox Inc. says so mkfs.ext4 "$DROPBOXFILE" # Move the current Dropbox folder to the backup location mv "$DROPBOXHOME" "$DROPBOXBACKUP" # Make a new Dropbox folder to replace the old one. This will be the mount point # under which the sparse file will be mounted mkdir "$DROPBOXHOME" # Make sure the mount point can't be written to if for some reason the partition # doesn't get mounted. We don't want dropbox to see an empty folder and think 'yay, let's delete # all his files because this folder is empty, that must be what they want' chattr +i "$DROPBOXHOME" # Mount the sparse file at the dropbox mount point mount -o loop "$DROPBOXFILE" "$DROPBOXHOME" # Copy the files from the existing dropbox folder to the new one, which will put them # inside the sparse file. You should see the file grow as this runs. rsync -a "$DROPBOXBACKUP"/ "$DROPBOXHOME"/ # Create a line in our /etc/fstab so this gets mounted on every boot up echo "$DROPBOXFILE" "$DROPBOXHOME" ext4 loop,defaults,rw,relatime,exec,user_xattr 0 0 | sudo tee -a /etc/fstab # Let's unmount it so we can make sure the above line worked umount "$DROPBOXHOME" # This will mount as per the fstab mount -a # Set ownership and permissions on the new folder so Dropbox has access chown $(id -un) "$DROPBOXHOME" chgrp $(id -gn) "$DROPBOXHOME" ./convert_dropbox.sh: line 1: #: command not found ./convert_dropbox.sh: line 2: $'\r': command not found ./convert_dropbox.sh: line 3: $'\r': command not found ./convert_dropbox.sh: line 4: $'\r': command not found ./convert_dropbox.sh: line 6: $'\r': command not found ./convert_dropbox.sh: line 7: $'\r': command not found ./convert_dropbox.sh: line 8: $'\r': command not found ./convert_dropbox.sh: line 10: $'\r': command not found ./convert_dropbox.sh: line 12: $'\r': command not found ./convert_dropbox.sh: line 13: $'\r': command not found ./convert_dropbox.sh: line 14: $'\r': command not found ./convert_dropbox.sh: line 16: $'\r': command not found dd: invalid number: ‘’ ./convert_dropbox.sh: line 18: $'\r': command not found ./convert_dropbox.sh: line 20: $'\r': command not found mke2fs 1.44.0 (7-Mar-2018) ' on device ''alid blocks ' ./convert_dropbox.sh: line 22: $'\r': command not found ./convert_dropbox.sh: line 24: $'\r': command not found mv: target ''$'\r' is not a directory ./convert_dropbox.sh: line 26: $'\r': command not found ./convert_dropbox.sh: line 28: $'\r': command not found mkdir: cannot create directory ‘’: No such file or directory ./convert_dropbox.sh: line 30: $'\r': command not found ./convert_dropbox.sh: line 32: $'\r': command not found chattr: No such file or directory while trying to stat ./convert_dropbox.sh: line 34: $'\r': command not found ./convert_dropbox.sh: line 36: $'\r': command not found mount: bad usage Try 'mount --help' for more information. ./convert_dropbox.sh: line 38: $'\r': command not found ./convert_dropbox.sh: line 40: $'\r': command not found rsync: failed to set times on "/mnt/cache/Temp/\#015/.": Operation not permitted (1) rsync: symlink "/mnt/cache/Temp/\#015/init" -> "/sbin/init" failed: Operation not permitted (1) rsync: recv_generator: mkdir "/mnt/cache/Temp/\#015/bin" failed: Operation not permitted (1) *** Skipping any contents from this failed directory *** rsync: recv_generator: mkdir "/mnt/cache/Temp/\#015/boot" failed: Operation not permitted (1) *** Skipping any contents from this failed directory *** rsync: recv_generator: mkdir "/mnt/cache/Temp/\#015/dev" failed: Operation not permitted (1) *** Skipping any contents from this failed directory *** rsync: mkstemp "/mnt/cache/Temp/\#015/.wget-hsts.ZE4WcX" failed: Operation not permitted (1) rsync: recv_generator: mkdir "/mnt/cache/Temp/\#015/etc" failed: Operation not permitted (1) *** Skipping any contents from this failed directory *** rsync: recv_generator: mkdir "/mnt/cache/Temp/\#015/home" failed: Operation not permitted (1) *** Skipping any contents from this failed directory *** rsync: recv_generator: mkdir "/mnt/cache/Temp/\#015/lib" failed: Operation not permitted (1) *** Skipping any contents from this failed directory *** rsync: recv_generator: mkdir "/mnt/cache/Temp/\#015/lib64" failed: Operation not permitted (1) *** Skipping any contents from this failed directory *** rsync: recv_generator: mkdir "/mnt/cache/Temp/\#015/mnt" failed: Operation not permitted (1) *** Skipping any contents from this failed directory *** Edited March 12, 2019 by jowi Quote Link to comment
jowi Posted March 12, 2019 Share Posted March 12, 2019 (edited) Entering the commands by hand one by one seems to do the trick... Edited March 12, 2019 by jowi Quote Link to comment
jowi Posted March 12, 2019 Share Posted March 12, 2019 (edited) Jeezes what a f$E^&%^&* mess this... it did not work, but now i got a .dropbox.img file i can not delete. Help? *edit* after 3.5 heart attacks i found that the folder the .img was in, had it's 'i' attribute set... removed that, and now it's gone... *wipes sweat of face* I'm gonna use the usb stick. That is something i understand Edited March 12, 2019 by jowi Quote Link to comment
CHBMB Posted March 12, 2019 Share Posted March 12, 2019 (edited) 4 hours ago, jowi said: Jeezes what a f$E^&%^&* mess this... it did not work, but now i got a .dropbox.img file i can not delete. Help? *edit* after 3.5 heart attacks i found that the folder the .img was in, had it's 'i' attribute set... removed that, and now it's gone... *wipes sweat of face* I'm gonna use the usb stick. That is something i understand Yeah, generally only run scripts from the internet that you understand. It's not a script, it's a series of commands. The only thing you should have to do is replace $HOME with the appropriate path Edited March 12, 2019 by CHBMB Quote Link to comment
jowi Posted March 12, 2019 Share Posted March 12, 2019 Depends on where you currently have stored Dropbox... mine was on a unassigned device. Also depends on where you want the dropbox to be afterwards. In my case, on my /mnt/cache in a Dropbox folder. And yes, commands placed after each other in a file, is called a script. Quote Link to comment
CHBMB Posted March 12, 2019 Share Posted March 12, 2019 (edited) 9 minutes ago, jowi said: Depends on where you currently have stored Dropbox... mine was on a unassigned device. Also depends on where you want the dropbox to be afterwards. In my case, on my /mnt/cache in a Dropbox folder. And yes, commands placed after each other in a file, is called a script. I admit I assumed you'd want the loopback device in the same location, in which case I stand by my original post, if you wished to move the location of dropbox storage then yeah, it needs altering. A script is a little bit more than just a sequence of commands, If it were truly a bash/sh script it would need a shebang line. In this case #!/bin/bash or #!/bin/sh it was the lack of that that made me interpret it as a sequence of commands rather than a script. Edited March 12, 2019 by CHBMB Quote Link to comment
CHBMB Posted March 12, 2019 Share Posted March 12, 2019 Also incidentally I wonder if the reason it didn't run was due to line endings. If you're using Windows then use Notepad++ and make sure the line endings are set to Linux rather than Windows. Quote Link to comment
jowi Posted March 13, 2019 Share Posted March 13, 2019 I did use the shebang line after the first attempt, and i did save it using np++. Not sure about the Linux line endings, np++ just shows CRLF. I also think the instructions (!) are too complicated; why make a backup and rsync back ets. Just stop Dropbox, remove the contents, create the image/loopback and let Dropbox sync itself to it on startup, would be simpler. Quote Link to comment
CHBMB Posted March 13, 2019 Share Posted March 13, 2019 I did use the shebang line after the first attempt, and i did save it using np++. Not sure about the Linux line endings, np++ just shows CRLF. I also think the instructions (!) are too complicated; why make a backup and rsync back ets. Just stop Dropbox, remove the contents, create the image/loopback and let Dropbox sync itself to it on startup, would be simpler.Use LF for LinuxSent from my Mi A1 using Tapatalk Quote Link to comment
jowi Posted March 13, 2019 Share Posted March 13, 2019 So if i understand correctly, the .dropbox.img file (sparsefile, formatted as ext4) is an actual file that persists somewhere on the array or ssd in another location then were Dropbox archive is. Lets say it is /mnt/disk1/temp/.dropbox.img Then we have a 2nd location, the actual location you enter in Dropbox, where Dropbox will sync its files to, lets say this is /mnt/cache/Dropbox And the .dropbox.img file is then mounted at /mnt/cache/Dropbox? So that /mnt/cache/Dropbox folder will basically show the contents of the .img file? (or the other way around) So Dropbox reads and writes to and from /mnt/cache/Dropbox but actually it is the .img file that will contain the data? Quote Link to comment
jowi Posted March 13, 2019 Share Posted March 13, 2019 Tried it again... now Dropbox thought i deleted all contents and it was removing everything on all my synced devices.... luckily i had a backup... Not gonna try this again unless someone makes a good foolproof tutorial on this that actually works. Back to the ext4 usb stick for me. Quote Link to comment
LakersFan Posted March 30, 2019 Share Posted March 30, 2019 On 3/11/2019 at 9:32 AM, jowi said: I've added a USB stick using the unassigned devices plugin, formatted it as EXT4, pointed the docker to it and voila, dropbox is now running Since Dropbox is constantly synced between all different devices, i don't need it to persists on the array anyway, but it is nice to have acces to it from within UNRAID. Can you explain this a bit more in detail? Did you put the config folder on the usb stick or the entire docker image? Quote Link to comment
jowi Posted March 30, 2019 Share Posted March 30, 2019 No, left the docker where it was (on my ssd drive /mnt/cache) and just changed the location of the dropbox data to the ext4 usb stick. Quote Link to comment
LakersFan Posted March 30, 2019 Share Posted March 30, 2019 7 hours ago, jowi said: No, left the docker where it was (on my ssd drive /mnt/cache) and just changed the location of the dropbox data to the ext4 usb stick. Thanks for the quick reply. In unraid, I do not see an option to format as ext4. Is there a plugin that does it? Quote Link to comment
jowi Posted March 30, 2019 Share Posted March 30, 2019 I've used the "unassigned devices" plugin and that let me format it as ext4. Btw, i've stopped using dropbox altogether, since they also only allow 3 devices all of a sudden... this makes it useless. They want to force you to take a subscription... i've now installed NextCloud using SpaceInvaderOne's excellent tutorial. Much better Quote Link to comment
LakersFan Posted March 30, 2019 Share Posted March 30, 2019 Thanks jowi. Decisions decisions... i initially tried rclone using SI's tutorial and I still couldnt get anything to sync into Dropbox. So then I searched for a straight Dropbox unraid app, which lead me to this thread. It looked promising until I reached the last few pages. lol Maybe I'll give NextCloud a shot. I've used SI's tutorials for many things but for whatever reason something wasn't working right in rclone. Thanks again! Quote Link to comment
stavr0s13 Posted July 13, 2019 Share Posted July 13, 2019 Hey ken-ji , Are you stillworking on it or it is dropped? Is there any other alternatives for true 2 way sync between dropbox <-> unraid? How can i set a VM doing the sync? As i read somewhere someone done it. Thanks!! Quote Link to comment
Recommended Posts
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.