cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn more about Dropbox Replay? We’ve just launched a brand new group, find out how to join here.

Apps and Installations

Have a question about a Dropbox app or installation? Reach out to the Dropbox Community and get solutions, help, and advice from members.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

It's possible change the default folder of dropbox to another folder?

It's possible change the default folder of dropbox to another folder?

Douglas16
Explorer | Level 4
Go to solution

Hello guys,  I'd like to know if it's possible to change the dropbox default folder (~/Dropbox) to another folder? For exemple, change the folder ~/Dropbox for /mnt/another/path, understand?

 

PS: I NEED do this via command line.

 

Any help and tips are welcome.

Thanks in advanced!!

1 Accepted Solution

Accepted Solutions

Rich
Super User II
Go to solution
Looking at a few other posts from Dropboxers in the past, there is no method to move the Dropbox folder from the command line.

View solution in original post

5 Replies 5

Rich
Super User II
Go to solution
You can move the Dropbox folder to another location (though I don't know if it's possible via command line) but the folder itself will always be called Dropbox.

Douglas16
Explorer | Level 4
Go to solution

Yeah, I found a way to do this via interface(https://www.dropbox.com/en/help/89), is easy, but as I said, I need do this via command line for the following reason: I should do this in another computer, in our local network, that I access via SSH protocol, I already installed the dropbox and logged in my dropbox account from this another computer via ssh protocol, but still missing make this little change.

 

Well even so,thanks very much for your time!

 

Any helps is welcome,folks!

Rich
Super User II
Go to solution
Looking at a few other posts from Dropboxers in the past, there is no method to move the Dropbox folder from the command line.

cilynx
New member | Level 2
Go to solution

It's not a perfect solution, but you can stop the dropbox daemon, move the data folder, then symlink the data folder in its new location back to your home directory.  I used this setup to move my dropbox data folder to an external drive when it got bigger than the SSD in my desktop.

 

dropbox stop
mv ~/Dropbox /mnt/another/path/
ln -s /mnt/another/path/Dropbox ~/
dropbox start

Just make sure your system is setup to mount the external drive before the dropbox daemon starts otherwise the daemon will get upset.  Fortunately (in my opinion) since ~/Dropbox will be a broken link if the external drive isn't there as opposed to an empty folder, the dropbox daemon will just complain and not do anything as opposed to trying to build a new replica on your system drive.

why777
Explorer | Level 4
Go to solution

This is not strictly command line but it is what I finally got to work
on a headless server via ssh.

I had to move the Dropbox directory on a newly installed fedora 30 machine,
which is remote and headless - I'll call that the "server".
My home machine, the "client", is a slightly older Fedora where I do run X.
The server is running dropbox-lnx.x86_64-79.4.143 installed in
~/.dropbox-dist
(Note - I had problems with being prompted for user/pw running this:
AUTHENTICATING FOR org.freedesktop.policykit.exec
until I made sure everything in .dropbox-dist was owned by user!)

I used to (on older server OS) get a dropbox tray icon on the client by
doing ssh -X to the server and running (as user) .dropbox-dist/dropboxd
I was hoping that the tray icon would let me change the directory.
But this does not happen in my current setup - don't know why.

The dropbox app is very picky about things like symlinks. Sometimes
it detects them and refuses to work, other times it seems not to
detect them. I did, along the way, manage to get it to seem to be working
with ~/Dropbox being a symlink to the place I wanted the directory, but
I'm happier with the solution I describe below.

I still do ssh -X to the server, and then (as user) .dropbox-dist/dropboxd.
(I suggest testing -X by running xclock - I had to install it to do so...)
It turns out that when I start dropbox after making ~Dropbox somehow
unacceptable to the app, the app now puts up a Firefox window - something
I had not seen before. This offers to link your dropbox account to the new
computer and then offers to MOVE THE DIRECTORY !!
It turns out that it insists on creating a NEW directory, named Dropbox,
but this is not so bad - just have to point it to where you want the
new directory (has to be writable by user).
It then starts downloading everything, which is not what I wanted, but
that's ok. I just stop the app, then replace the newly created directory
with the data I already had (not all that clear that this actually saves
any time/bandwidth), then restart the app.

The way I ended up making the default directory unacceptable to the app
was using sshfs to mount my intended directory as ~/Dropbox. I suspect
lots of other things would work. The important thing is that the app
changes the location. This seems to involve writing binary files in
~/.dropbox, along with one ascii file, info.json, which shows the
location it's using - a useful check.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    why777 Explorer | Level 4
  • User avatar
    cilynx New member | Level 2
  • User avatar
    Rich Super User II
  • User avatar
    Douglas16 Explorer | Level 4
What do Dropbox user levels mean?