We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
MHBoise
7 years agoExplorer | Level 4
Linux... move the Dropbox Folder
I have been looking but not finding anything... can anyone point me in the right direction for moving the Dropbox folder? I have Ubuntu Server (no Gui) installed and the Dropbox folder (and the two symlinks Dropbox Business created) is located in the home directory. My data is in another directory (seperate hard drive) called Shares. With the receint Dropbox update The symlink I created no longer work and I am dead in the water... Everything I do must be via Command Line...
26 Replies
Replies have been turned off for this discussion
- Здравко7 years agoLegendary | Level 20
nullptr wrote:
...Unfortunately, there are no solutions for those of us that relied on symlinks to backup data outside of the dropbox folder.
Hi nullptr,
Your statement isn't true actually! The symbolic link might be most convenient for many users, but isn't the only one.
nullptr wrote:... Putting a bind mount in your dropbox folder will break the dropbox daemon and prevent it from syncing.
...😏 Actually, your statement could be true here (partially). Directory binding is additional layer between underlying file system and users programs. Such a layers interface, on Linux, always have nature of FS interface. In this context - binding falls in FS restrictions of Dropbox (bind interface isn't inside Dropbox "white list"). The truth in your statement is up to here. There is relatively easy way, developed long time ago in context of FS limitation introduction, which just overcome this limitation. Such method could be used and there is example for use here (just change device mount to binding). 😉 That's it.
Enjoy!
- nullptr7 years agoHelpful | Level 6
Здравко wrote:
(just change device mount to binding). 😉 That's it.I looked at the code in that post. It looks like it hard-codes filesystem type to EXT4 for stat calls and passes extra mode parameters in open calls. I don't see how this helps. Since I'm already using a bind mount on an EXT4 filesystem unsuccessfully are you saying that a solution is to change the hard-coded file system type? To what? The magic number for directory binding (does this exist)?
- nullptr7 years agoHelpful | Level 6
Здравко wrote:Or are you saying that when you use a bind mount, that the fs type passed to stat calls is something other than ext4?
- Здравко7 years agoLegendary | Level 20
nullptr wrote:
...I looked at the code in that post. It looks like it hard-codes filesystem type to EXT4 for stat calls and passes extra mode parameters in open calls. I don't see how this helps. ...
Hi nullptr,
Yes, you are (almost) right. There isn't "extra mode", just parameters forward. I'm not sure what's not clear enough.
nullptr wrote:
... Since I'm already using a bind mount on an EXT4 filesystem unsuccessfully are you saying that a solution is to change the hard-coded file system type? ...Yes, exactly!
nullptr wrote:...
To what? The magic number for directory binding (does this exist)?
I noted already in previous post. FS-type (and corresponding "magic number"), not directory!
nullptr wrote:
...Or are you saying that when you use a bind mount, that the fs type passed to stat calls is something other than ext4?
Yes, exactly!
Hope this adds some clarity.
- Midgley7 years agoCollaborator | Level 8
I suppose it might be worth a try to move the Home folder instead of doing tricky things with symlinks and mounting drives in the dropbox folder. Even so think you would need to uninstall dropbox, move the Home folder, or reinstall Linux and designate a Home partition of your choice. Then install Dropbox and everthing would be hunky dory. I will try that some time but for now I have giving up on Dropbox for my work. Currently I am just running rsync -a Lol.
- Здравко7 years agoLegendary | Level 20
Hi Midgley,
😀😃 If that's sounding easier for you... 😉
- Midgley7 years agoCollaborator | Level 8
Lol... I really does! Well maybe not but sometimes it is better than doing too many trix and side steps.
- cipherguru6 years agoHelpful | Level 5
I guess its my lack of understanding of C++ and Ubuntu but I could not understand what you meant by "(just change device mount to binding)"
Does it require change in the source code? Which line? to what?
I tried ad-hoc fixes based on what I could understand
For example, I tried changing EXT4_SUPER_MAGIC to BINDERFS_SUPER_MAGIC but got the error
<stdin>: In function ‘statfs’:
<stdin>:21:19: error: ‘BINDERFS_SUPER_MAGIC’ undeclared (first use in this function)
<stdin>:21:19: note: each undeclared identifier is reported only once for each function it appears in
<stdin>: In function ‘statfs64’:
<stdin>:32:19: error: ‘BINDERFS_SUPER_MAGIC’ undeclared (first use in this function)undoing the change says
Your Dropbox is already patched.
So I'm doing something wrong.
- Здравко6 years agoLegendary | Level 20
cipherguru wrote:I guess its my lack of understanding of C++ and Ubuntu but I could not understand what you meant by "(just change device mount to binding)"
...Hi cipherguru,
Actually, there isn't any C++ code! Where you see it? API layer functions are C functions, not C++! Other (biggest) part is a shell-script ('bash' - more precise).
cipherguru wrote:...
Does it require change in the source code? Which line? to what?
...No actually. What make you think that any changes are needed?
cipherguru wrote:
...For example, I tried changing EXT4_SUPER_MAGIC to BINDERFS_SUPER_MAGIC but got the error
...I can't see any reason for such change, but if you want see what FS magic numbers are available for your system, take a look on "/usr/include/linux/magic.h". In my case I can't find "BINDERFS_SUPER_MAGIC". Where you find this from (and more important why - isn't Ext4 enough, though)?
- cipherguru6 years agoHelpful | Level 5
I believe the example does not work anymore.
In more details, I had some folders in my dropbox linked via mount -o bind. These stopped syncing sometime in Feb 2020. The client now does not sync files in those folders and the command line tells me `<filename>: unsyncable` for every such file.
I tried running the script as-is (after the fix mentioned in the original post).. however situation is same. Does this not work anymore?
Are there other alternatives to dropbox that work on ubuntu and dont have this illogical bug.
About Create, upload, and share
Find help to solve issues with creating, uploading, and sharing files and folders in Dropbox. Get support and advice from the Dropbox Community.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!