Rclone and dropbox

Hi together,

What is the problem you are having with rclone?

I would like to back up my Linux systems to my DropBox. To do this, I have created an app (https://www.dropbox.com/developers/apps) with the following details:

I would like to have the following structure so that each device only sees its own folder and does not have full access to the entire DropBox. Goal:

Linux system rapsberry-pi-002 -> dropbox\apps\rapsberry-pi-002
Linux system rapsberry-pi-003 -> dropbox\apps\rapsberry-pi-003
Linux system rapsberry-pi-004 -> dropbox\apps\rapsberry-pi-004
...

e.g. I would like to back up the folders /etc and /var from rapsberry-pi-002.
Then it should look like this in the DropBox:

dropbox\apps\rapsberry-pi-002\etc
dropbox\apps\rapsberry-pi-002\var

Sometimes it works, sometimes not. But sometimes I have access to the entire DropBox. The token also expires after a while. How can I integrate a token that does not expire or receive the refresh token?

Are there any instructions for integrating my project?

Run the command 'rclone version' and share the full output of the command.

root@raspberry-pi-002:/# rclone version
rclone v1.60.1-DEV
- os/version: raspbian 12.10 (64 bit)
- os/kernel: 6.6.74+rpt-rpi-2712 (aarch64)
- os/type: linux
- os/arch: arm64
- go/version: go1.19.8
- go/linking: dynamic
- go/tags: none

Are you on the latest version of rclone? You can validate by checking the version listed here: Rclone downloads
--> Installed via APT and apparently no update available.

Which cloud storage system are you using? (eg Google Drive)

DropBox

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

Command not found but no update available

Step 1 - update rclone.
Remove the apt version and install the latest.

Some issue.
I've connected rclone with the dropbox and tried the following command to verify my config:

root@raspberry-pi-002:~# rclone sync /etc raspberry-pi-002:etc

The "etc" folder is directly under dropbox, not in the dropbox\raspberry-pi-002 folder.

your original config was created using that years old rclone version.

i would start over, create a new app at dropbox, create a new config for rclone
and after doing that, post the output of

  • rclone version
  • rclone config redacted
  • full debug log

In addition, the rclone syntax for remote destination is remote:path/to/dir so you need:

rclone sync /etc raspberry-pi-002:raspberry-pi-002/etc

I have already started again.

Deleted the old version, installed the new version, created a new app in Dropbox, generated tokens and created a new Rclone configuration.

The connection works. I have the problem that the structure of the storage does not work.
As far as I know, rclone stores everything in the “apps” folder in DropBox. Now it seems that the etc folder was created directly in the DropBox.
I would like to have a clean separation here, as the systems / rclone should / may only have access to the specific folder in order to have a certain security aspect.

root@raspberry-pi-002:~# rclone version
rclone v1.69.1
- os/version: raspbian 12.10 (64 bit)
- os/kernel: 6.6.74+rpt-rpi-2712 (aarch64)
- os/type: linux
- os/arch: arm64 (ARMv8 compatible)
- go/version: go1.24.0
- go/linking: static
- go/tags: none
root@raspberry-pi-002:~# rclone config redacted
[raspberry-pi-002]
type = dropbox
token = XXX
### Double check the config for sensitive info before posting publicly
root@raspberry-pi-002:~#

can you please post something to prove that?


Find the App key and App secret values on the Settings tab. Use these values in rclone config to add a new remote or edit an existing remote. The App key setting corresponds to client_id in rclone config, the App secret corresponds to client_secret


this is what my remote looks like

rclone config redacted remote:
[remote]
type = dropbox
client_id = XXX
client_secret = XXX
token = XXX

Only when you configure App ID this way. Read maybe docs first to avoid any basic mistakes:

How can I implement my plan?

i already shared with you what my remote looks like and i shared the documentation link on what you need to do.

I can't find an explanation of how I can restrict access to the folder or how the folder creation and management works.

i followed the rclone docs, just created an app folder named zorkzork, seems to work as expected.

rclone tree dropbox_root:
/
├── Apps
│   └── zorkzork
│       └── file.ext

rclone tree dropbox_zorkzork:
/
└── file.ext

Sorry, I think I'm still struggling to understand something. My approach:

I create a new app at https://www.dropbox.com/developers/apps/create

As I understand it, this configuration is now such that the rlcone connection, which establishes the connection to this app, can only read and write in the raspberry-pi-002 folder.

If I now create the rclone config for this app on the raspberry-pi-002, it is written to the root directory of the DropBox. Which is not what I want.
I don't quite understand the interaction yet. How can I restrict to which folders?

I've read the documentary over and over again, but unfortunately I just don't understand it... It's still stuck in my head :frowning:

Permissions:

Spot the difference between what you've got:

[raspberry-pi-002]
type = dropbox
token = XXX

vs. what you need:

[raspberry-pi-002]
type = dropbox
client_id = XXX
client_secret = XXX
token = XXX

You can configure as many client_id as you wish but if you do not use them then it does not make any difference.

Delete you config and start again. This time provide client_id and secret during configuration process.

This will allow you to store data in dropbox app folder (assuming your client_id is configured as per docs).

For different client's "isolation" you could do something like this:

[dropbox_remote]
type = dropbox
client_id = XXX
client_secret = XXX
token = XXX

[raspberry-pi-001]
type = alias
remote = dropbox_remote:raspberry-pi-001

[raspberry-pi-002]
type = alias
remote = dropbox_remote:raspberry-pi-002

Where can I find this parameters? Do I need to configure the permissions?

We gave you this link many times already:

What is not clear? Can't you read documentation yourself or you need assistant?

Okay, I'll try to show what I did to make it clearer:

I started the configuration and created a new remote configuration:

root@raspberry-pi-002:~/.config/rclone# rclone config
2025/04/01 07:15:39 NOTICE: Config file "/root/.config/rclone/rclone.conf" not found - using defaults
No remotes found, make a new one?
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n

Enter name for new remote.
name> raspberry-pi-002

Choosed DropBox

Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
 [...]
13 / Dropbox
   \ (dropbox)
[...]
Storage> 13

Took ClientID and Secret from created App

Option client_id.
OAuth Client Id.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_id> a************f

Option client_secret.
OAuth Client Secret.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_secret> s************q

Edit advanced config?
y) Yes
n) No (default)
y/n> n

Since I don't have a GUI on the system, I used my PC for authentication. To do this, I created a JSON with the credentials and then transferred them to rclone.

JSON:
{
  “client_id": ‘a************f’,
  “client_secret": ”s************q”
}

Command in the CMD:

Get-Content .\creds.json | .\rclone authorize “dropbox”

Use web browser to automatically authenticate rclone with remote?
 * Say Y if the machine running rclone has a web browser you can use
 * Say N if running rclone on a (remote) machine without web browser access
If not sure try Y. If Y failed, try N.

y) Yes (default)
n) No
y/n> n

After confirming in the web browser, I received the corresponding token in the CMD and integrated it in the rlcone config:

{"access_token":"sl.u.AFoNt8aCLjgX5l7J6cfdd-ECLyRGXkm0X__P_2eMFMjcD0cf7BRPJVpcYSe0MUAeJ6qx0qODjEeu2cYBMZ9yd4m6mRx-5br9o6xswlKB1cYB-aYWEQ6yxk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OwLgfj79_0mdeOZM-Y7Id4YjD3a_e_dQYIVT3I5TtmImum2ACXOH694bsVoRejO1jXTIg9Ynt9R8L0O44T-0ZLf8iDePpz1rC5A0cPuVPWb_VjBtha_05fAgudPPQ","token_type":"bearer","refresh_token":"n291Fy3yYqcAAAAAAAAAAaHWhOjv-LHJCXQJKMUxVX508Wtk8CxcTKAi54vwHLTJ","expiry":"2025-04-01T11:21:56.9669203+02:00"}
Option config_token.
For this to work, you will need rclone available on a machine that has
a web browser available.
For more help and alternate methods see: https://rclone.org/remote_setup/
Execute the following on the machine with the web browser (same rclone
version recommended):
        rclone authorize "dropbox" "eyJjbGllbnRfaWQiOiIwNjQ0d3Zhc2Jmczd0b2wiLCJjbGllbnRfc2VjcmV0Ijoic3NoZWZhbnFuZjN6NnFkIn0"
Then paste the result.
Enter a value.
config_token> {"access_token":"sl.u.AFoNt8aCLjgX5l7J6cfdd-ECLyRGXkm0X__P_2eMFMjcD0cf7BRPJVpcYSe0MUAeJ6qx0qODjEeu2cYBMZ9yd4m6mRx-5br9o6xswlKB1cYB-aYWEQ6yxkBAyxErEmN0k7h3L8edNYgXzK0osd9G8rHZbRzt1vX4PYYqefDrFcS-942aHk4WEcBGtCIgNag_RHFaPKwd44tewxQOQXCgBOZ7WtTjynoVGfSr8vAYoWvu-4eHxFoGQGWalrRndQ50zjVmva6x6Gpw8Wb68LxrRdHZPFzfto2tq-FMb3NQA2n4fV6dyXiREZwNub8nvwIkMvFa9WeFC9ueXwK1upmVzqjNTchLHF9Y6wto5oflP9e1LkirrpFWafwars76HT9LpycRIfhhxq4Y7tMQLHwfQGqwY7DgzuEYBavVgVBqK6oQzIlhcuIBoXbBfdh-Iq_w4bpfJ9JsCF6U59wUz-KIKiJgz2zGU2UM58AJM5IKdOxG1mhilJ9Ga5sinSdeA5QBM3G2kPtaYFiehlJD6m_KnEPhtb4cBd9MzD2vUgBoehWKHQWjGCezV9ZBV4NK6jAMDuZ453uJnC27wdawrnTRjAMYhs6xeUgTYL6c2urqVJS5hTTKVR5GyvKGDX2esnp6Qyoetorr0hEao6MnBPFGXpwPAm5lf6GF7S5gwit5N2Op2Rl74Z0N4uRzy8fwtdK7OKyFFYAPAfXeLcX0BZLvllvAqYoLsBlcpE0Oe7WOAF0llF1hvKKNIbofyNzxU0EVzCOsAmQrcpbFpb1qsFNXRjJmkAdHV9oSrMaN9Wbif_F-Nkgi5N9CIs2Yjb7-I91moq_81i_UJkcSJ7BaX8XySVsxzb1yre7a8pshBk-PFhVR8Bd7djYxN09Au1pXiPImLNT2HBarU96vVZa8RimZnvQWQ8Ojhq3q0raPBiD-CBnwPRpUsIowQ-HIXpDCZcRrcDcRseUk8Kykigb1v0YQDhZfPsuXx2NYHA2W_4vNy_Vu--twdy3hteDsc052Yjz6ISyY5AJiWLnsU7kdTd-VrzZOfw77la16TyUaw0060vR445bbLPPCC_yUunQ_GpulRwPMlxofi8K3OR39qO_1WP3MFVw5T1zTMe55GZG264Y_YJ69lYGQ-tKP_rcRG8JQkAH_PTkRcaET4MSVhEx7vbPZfMAZd4LeAqO9IPeD19OjQmYsPOwLgfj79_0mdeOZM-Y7Id4YjD3a_e_dQYIVT3I5TtmImum2ACXOH694bsVoRejO1jXTIg9Ynt9R8L0O44T-0ZLf8iDePpz1rC5A0cPuVPWb_VjBtha_05fAgudPPQ","token_type":"bearer","refresh_token":"n291Fy3yYqcAAAAAAAAAAaHWhOjv-LHJCXQJKMUxVX508Wtk8CxcTKAi54vwHLTJ","expiry":"2025-04-01T11:21:56.9669203+02:00"}
Configuration complete.
Options:
- type: dropbox
- client_id: a************f
- client_secret: s************q
- token: {"access_token":"sl.u.AFoNt8aCLjgX5l7J6cfdd-ECLyRGXkm0X__P_2eMFMjcD0cf7BRPJVpcYSe0MUAeJ6qx0qODjEeu2cYBMZ9yd4m6mRx-5br9o6xswlKB1cYB-aYWEQ6yxkBAyxErEmN0k7h3L8edNYgXzK0osd9G8rHZbRzt1vX4PYYqefDrFcS-942aHk4WEcBGtCIgN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Ynt9R8L0O44T-0ZLf8iDePpz1rC5A0cPuVPWb_VjBtha_05fAgudPPQ","token_type":"bearer","refresh_token":"n291Fy3yYqcAAAAAAAAAAaHWhOjv-LHJCXQJKMUxVX508Wtk8CxcTKAi54vwHLTJ","expiry":"2025-04-01T11:21:56.9669203+02:00"}
Keep this "raspberry-pi-002" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y

Current remotes:

Name                 Type
====                 ====
raspberry-pi-002     dropbox

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> q

Now I have checked what can be seen. Unfortunately, the entire DropBox root folder was visible again.

root@raspberry-pi-002:~/.config/rclone# rclone lsd raspberry-pi-002:
          -1 2000-01-01 01:00:00        -1 NAME_OF_FOLDER_IN_DROPBOX
          -1 2000-01-01 01:00:00        -1 NAME_OF_FOLDER_IN_DROPBOX
          -1 2000-01-01 01:00:00        -1 NAME_OF_FOLDER_IN_DROPBOX
          -1 2000-01-01 01:00:00        -1 NAME_OF_FOLDER_IN_DROPBOX
          -1 2000-01-01 01:00:00        -1 NAME_OF_FOLDER_IN_DROPBOX
          -1 2000-01-01 01:00:00        -1 NAME_OF_FOLDER_IN_DROPBOX
          -1 2000-01-01 01:00:00        -1 NAME_OF_FOLDER_IN_DROPBOX
          -1 2000-01-01 01:00:00        -1 NAME_OF_FOLDER_IN_DROPBOX

I just don't understand how I can implement it so that the desired folder structure and authorization structure takes effect.
The respective system to be backed up should only ever have access to the folder that is assigned to it. So:

Linux system raspberry-pi-002 -> only access to dropbox\apps\raspberry-pi-002
Linux system raspberry-pi-003 -> only access to dropbox\apps\raspberry-pi-003
etc....

This “apps” folder was created automatically in one of my previous attempts. For whatever reason ... I once read that this is done by rclone.

I hope I was able to bring some more clarity.
I have deleted tokens and accesses again, they were only for test purposes and to make my approach here clearer.
Thank you

Using client_id you can configure it so your data will be stored in app dropbox folder.

AFAIK you can NOT unless you have Dropbox business with multiple users sub accounts.

I have showed you some workaround earlier using aliases. It will limit dropbox directories visibility for specific client. But if you do not trust your clients then it is not the best option as effectively every client can access everything else what is only "hidden" by connecting directly to main dropbox remote or editing alias.

So my plan of strict separation is not possible at all or only possible by hiding certain folders?