github.com/artpar/rclone@v1.67.3/docs/content/dropbox.md (about) 1 --- 2 title: "Dropbox" 3 description: "Rclone docs for Dropbox" 4 versionIntroduced: "v1.02" 5 --- 6 7 # {{< icon "fab fa-dropbox" >}} Dropbox 8 9 Paths are specified as `remote:path` 10 11 Dropbox paths may be as deep as required, e.g. 12 `remote:directory/subdirectory`. 13 14 ## Configuration 15 16 The initial setup for dropbox involves getting a token from Dropbox 17 which you need to do in your browser. `rclone config` walks you 18 through it. 19 20 Here is an example of how to make a remote called `remote`. First run: 21 22 rclone config 23 24 This will guide you through an interactive setup process: 25 26 ``` 27 n) New remote 28 d) Delete remote 29 q) Quit config 30 e/n/d/q> n 31 name> remote 32 Type of storage to configure. 33 Choose a number from below, or type in your own value 34 [snip] 35 XX / Dropbox 36 \ "dropbox" 37 [snip] 38 Storage> dropbox 39 Dropbox App Key - leave blank normally. 40 app_key> 41 Dropbox App Secret - leave blank normally. 42 app_secret> 43 Remote config 44 Please visit: 45 https://www.dropbox.com/1/oauth2/authorize?client_id=XXXXXXXXXXXXXXX&response_type=code 46 Enter the code: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX_XXXXXXXXXX 47 -------------------- 48 [remote] 49 app_key = 50 app_secret = 51 token = XXXXXXXXXXXXXXXXXXXXXXXXXXXXX_XXXX_XXXXXXXXXXXXXXXXXXXXXXXXXXXXX 52 -------------------- 53 y) Yes this is OK 54 e) Edit this remote 55 d) Delete this remote 56 y/e/d> y 57 ``` 58 59 See the [remote setup docs](/remote_setup/) for how to set it up on a 60 machine with no Internet browser available. 61 62 Note that rclone runs a webserver on your local machine to collect the 63 token as returned from Dropbox. This only 64 runs from the moment it opens your browser to the moment you get back 65 the verification code. This is on `http://127.0.0.1:53682/` and it 66 may require you to unblock it temporarily if you are running a host 67 firewall, or use manual mode. 68 69 You can then use it like this, 70 71 List directories in top level of your dropbox 72 73 rclone lsd remote: 74 75 List all the files in your dropbox 76 77 rclone ls remote: 78 79 To copy a local directory to a dropbox directory called backup 80 81 rclone copy /home/source remote:backup 82 83 ### Dropbox for business 84 85 Rclone supports Dropbox for business and Team Folders. 86 87 When using Dropbox for business `remote:` and `remote:path/to/file` 88 will refer to your personal folder. 89 90 If you wish to see Team Folders you must use a leading `/` in the 91 path, so `rclone lsd remote:/` will refer to the root and show you all 92 Team Folders and your User Folder. 93 94 You can then use team folders like this `remote:/TeamFolder` and 95 `remote:/TeamFolder/path/to/file`. 96 97 A leading `/` for a Dropbox personal account will do nothing, but it 98 will take an extra HTTP transaction so it should be avoided. 99 100 ### Modification times and hashes 101 102 Dropbox supports modified times, but the only way to set a 103 modification time is to re-upload the file. 104 105 This means that if you uploaded your data with an older version of 106 rclone which didn't support the v2 API and modified times, rclone will 107 decide to upload all your old data to fix the modification times. If 108 you don't want this to happen use `--size-only` or `--checksum` flag 109 to stop it. 110 111 Dropbox supports [its own hash 112 type](https://www.dropbox.com/developers/reference/content-hash) which 113 is checked for all transfers. 114 115 ### Restricted filename characters 116 117 | Character | Value | Replacement | 118 | --------- |:-----:|:-----------:| 119 | NUL | 0x00 | ␀ | 120 | / | 0x2F | / | 121 | DEL | 0x7F | ␡ | 122 | \ | 0x5C | \ | 123 124 File names can also not end with the following characters. 125 These only get replaced if they are the last character in the name: 126 127 | Character | Value | Replacement | 128 | --------- |:-----:|:-----------:| 129 | SP | 0x20 | ␠ | 130 131 Invalid UTF-8 bytes will also be [replaced](/overview/#invalid-utf8), 132 as they can't be used in JSON strings. 133 134 ### Batch mode uploads {#batch-mode} 135 136 Using batch mode uploads is very important for performance when using 137 the Dropbox API. See [the dropbox performance guide](https://developers.dropbox.com/dbx-performance-guide) 138 for more info. 139 140 There are 3 modes rclone can use for uploads. 141 142 #### --dropbox-batch-mode off 143 144 In this mode rclone will not use upload batching. This was the default 145 before rclone v1.55. It has the disadvantage that it is very likely to 146 encounter `too_many_requests` errors like this 147 148 NOTICE: too_many_requests/.: Too many requests or write operations. Trying again in 15 seconds. 149 150 When rclone receives these it has to wait for 15s or sometimes 300s 151 before continuing which really slows down transfers. 152 153 This will happen especially if `--transfers` is large, so this mode 154 isn't recommended except for compatibility or investigating problems. 155 156 #### --dropbox-batch-mode sync 157 158 In this mode rclone will batch up uploads to the size specified by 159 `--dropbox-batch-size` and commit them together. 160 161 Using this mode means you can use a much higher `--transfers` 162 parameter (32 or 64 works fine) without receiving `too_many_requests` 163 errors. 164 165 This mode ensures full data integrity. 166 167 Note that there may be a pause when quitting rclone while rclone 168 finishes up the last batch using this mode. 169 170 #### --dropbox-batch-mode async 171 172 In this mode rclone will batch up uploads to the size specified by 173 `--dropbox-batch-size` and commit them together. 174 175 However it will not wait for the status of the batch to be returned to 176 the caller. This means rclone can use a much bigger batch size (much 177 bigger than `--transfers`), at the cost of not being able to check the 178 status of the upload. 179 180 This provides the maximum possible upload speed especially with lots 181 of small files, however rclone can't check the file got uploaded 182 properly using this mode. 183 184 If you are using this mode then using "rclone check" after the 185 transfer completes is recommended. Or you could do an initial transfer 186 with `--dropbox-batch-mode async` then do a final transfer with 187 `--dropbox-batch-mode sync` (the default). 188 189 Note that there may be a pause when quitting rclone while rclone 190 finishes up the last batch using this mode. 191 192 193 {{< rem autogenerated options start" - DO NOT EDIT - instead edit fs.RegInfo in backend/dropbox/dropbox.go then run make backenddocs" >}} 194 ### Standard options 195 196 Here are the Standard options specific to dropbox (Dropbox). 197 198 #### --dropbox-client-id 199 200 OAuth Client Id. 201 202 Leave blank normally. 203 204 Properties: 205 206 - Config: client_id 207 - Env Var: RCLONE_DROPBOX_CLIENT_ID 208 - Type: string 209 - Required: false 210 211 #### --dropbox-client-secret 212 213 OAuth Client Secret. 214 215 Leave blank normally. 216 217 Properties: 218 219 - Config: client_secret 220 - Env Var: RCLONE_DROPBOX_CLIENT_SECRET 221 - Type: string 222 - Required: false 223 224 ### Advanced options 225 226 Here are the Advanced options specific to dropbox (Dropbox). 227 228 #### --dropbox-token 229 230 OAuth Access Token as a JSON blob. 231 232 Properties: 233 234 - Config: token 235 - Env Var: RCLONE_DROPBOX_TOKEN 236 - Type: string 237 - Required: false 238 239 #### --dropbox-auth-url 240 241 Auth server URL. 242 243 Leave blank to use the provider defaults. 244 245 Properties: 246 247 - Config: auth_url 248 - Env Var: RCLONE_DROPBOX_AUTH_URL 249 - Type: string 250 - Required: false 251 252 #### --dropbox-token-url 253 254 Token server url. 255 256 Leave blank to use the provider defaults. 257 258 Properties: 259 260 - Config: token_url 261 - Env Var: RCLONE_DROPBOX_TOKEN_URL 262 - Type: string 263 - Required: false 264 265 #### --dropbox-chunk-size 266 267 Upload chunk size (< 150Mi). 268 269 Any files larger than this will be uploaded in chunks of this size. 270 271 Note that chunks are buffered in memory (one at a time) so rclone can 272 deal with retries. Setting this larger will increase the speed 273 slightly (at most 10% for 128 MiB in tests) at the cost of using more 274 memory. It can be set smaller if you are tight on memory. 275 276 Properties: 277 278 - Config: chunk_size 279 - Env Var: RCLONE_DROPBOX_CHUNK_SIZE 280 - Type: SizeSuffix 281 - Default: 48Mi 282 283 #### --dropbox-impersonate 284 285 Impersonate this user when using a business account. 286 287 Note that if you want to use impersonate, you should make sure this 288 flag is set when running "rclone config" as this will cause rclone to 289 request the "members.read" scope which it won't normally. This is 290 needed to lookup a members email address into the internal ID that 291 dropbox uses in the API. 292 293 Using the "members.read" scope will require a Dropbox Team Admin 294 to approve during the OAuth flow. 295 296 You will have to use your own App (setting your own client_id and 297 client_secret) to use this option as currently rclone's default set of 298 permissions doesn't include "members.read". This can be added once 299 v1.55 or later is in use everywhere. 300 301 302 Properties: 303 304 - Config: impersonate 305 - Env Var: RCLONE_DROPBOX_IMPERSONATE 306 - Type: string 307 - Required: false 308 309 #### --dropbox-shared-files 310 311 Instructs rclone to work on individual shared files. 312 313 In this mode rclone's features are extremely limited - only list (ls, lsl, etc.) 314 operations and read operations (e.g. downloading) are supported in this mode. 315 All other operations will be disabled. 316 317 Properties: 318 319 - Config: shared_files 320 - Env Var: RCLONE_DROPBOX_SHARED_FILES 321 - Type: bool 322 - Default: false 323 324 #### --dropbox-shared-folders 325 326 Instructs rclone to work on shared folders. 327 328 When this flag is used with no path only the List operation is supported and 329 all available shared folders will be listed. If you specify a path the first part 330 will be interpreted as the name of shared folder. Rclone will then try to mount this 331 shared to the root namespace. On success shared folder rclone proceeds normally. 332 The shared folder is now pretty much a normal folder and all normal operations 333 are supported. 334 335 Note that we don't unmount the shared folder afterwards so the 336 --dropbox-shared-folders can be omitted after the first use of a particular 337 shared folder. 338 339 Properties: 340 341 - Config: shared_folders 342 - Env Var: RCLONE_DROPBOX_SHARED_FOLDERS 343 - Type: bool 344 - Default: false 345 346 #### --dropbox-pacer-min-sleep 347 348 Minimum time to sleep between API calls. 349 350 Properties: 351 352 - Config: pacer_min_sleep 353 - Env Var: RCLONE_DROPBOX_PACER_MIN_SLEEP 354 - Type: Duration 355 - Default: 10ms 356 357 #### --dropbox-encoding 358 359 The encoding for the backend. 360 361 See the [encoding section in the overview](/overview/#encoding) for more info. 362 363 Properties: 364 365 - Config: encoding 366 - Env Var: RCLONE_DROPBOX_ENCODING 367 - Type: Encoding 368 - Default: Slash,BackSlash,Del,RightSpace,InvalidUtf8,Dot 369 370 #### --dropbox-batch-mode 371 372 Upload file batching sync|async|off. 373 374 This sets the batch mode used by rclone. 375 376 For full info see [the main docs](https://rclone.org/dropbox/#batch-mode) 377 378 This has 3 possible values 379 380 - off - no batching 381 - sync - batch uploads and check completion (default) 382 - async - batch upload and don't check completion 383 384 Rclone will close any outstanding batches when it exits which may make 385 a delay on quit. 386 387 388 Properties: 389 390 - Config: batch_mode 391 - Env Var: RCLONE_DROPBOX_BATCH_MODE 392 - Type: string 393 - Default: "sync" 394 395 #### --dropbox-batch-size 396 397 Max number of files in upload batch. 398 399 This sets the batch size of files to upload. It has to be less than 1000. 400 401 By default this is 0 which means rclone which calculate the batch size 402 depending on the setting of batch_mode. 403 404 - batch_mode: async - default batch_size is 100 405 - batch_mode: sync - default batch_size is the same as --transfers 406 - batch_mode: off - not in use 407 408 Rclone will close any outstanding batches when it exits which may make 409 a delay on quit. 410 411 Setting this is a great idea if you are uploading lots of small files 412 as it will make them a lot quicker. You can use --transfers 32 to 413 maximise throughput. 414 415 416 Properties: 417 418 - Config: batch_size 419 - Env Var: RCLONE_DROPBOX_BATCH_SIZE 420 - Type: int 421 - Default: 0 422 423 #### --dropbox-batch-timeout 424 425 Max time to allow an idle upload batch before uploading. 426 427 If an upload batch is idle for more than this long then it will be 428 uploaded. 429 430 The default for this is 0 which means rclone will choose a sensible 431 default based on the batch_mode in use. 432 433 - batch_mode: async - default batch_timeout is 10s 434 - batch_mode: sync - default batch_timeout is 500ms 435 - batch_mode: off - not in use 436 437 438 Properties: 439 440 - Config: batch_timeout 441 - Env Var: RCLONE_DROPBOX_BATCH_TIMEOUT 442 - Type: Duration 443 - Default: 0s 444 445 #### --dropbox-batch-commit-timeout 446 447 Max time to wait for a batch to finish committing 448 449 Properties: 450 451 - Config: batch_commit_timeout 452 - Env Var: RCLONE_DROPBOX_BATCH_COMMIT_TIMEOUT 453 - Type: Duration 454 - Default: 10m0s 455 456 #### --dropbox-description 457 458 Description of the remote 459 460 Properties: 461 462 - Config: description 463 - Env Var: RCLONE_DROPBOX_DESCRIPTION 464 - Type: string 465 - Required: false 466 467 {{< rem autogenerated options stop >}} 468 469 ## Limitations 470 471 Note that Dropbox is case insensitive so you can't have a file called 472 "Hello.doc" and one called "hello.doc". 473 474 There are some file names such as `thumbs.db` which Dropbox can't 475 store. There is a full list of them in the ["Ignored Files" section 476 of this document](https://www.dropbox.com/en/help/145). Rclone will 477 issue an error message `File name disallowed - not uploading` if it 478 attempts to upload one of those file names, but the sync won't fail. 479 480 Some errors may occur if you try to sync copyright-protected files 481 because Dropbox has its own [copyright detector](https://techcrunch.com/2014/03/30/how-dropbox-knows-when-youre-sharing-copyrighted-stuff-without-actually-looking-at-your-stuff/) that 482 prevents this sort of file being downloaded. This will return the error `ERROR : 483 /path/to/your/file: Failed to copy: failed to open source object: 484 path/restricted_content/.` 485 486 If you have more than 10,000 files in a directory then `rclone purge 487 dropbox:dir` will return the error `Failed to purge: There are too 488 many files involved in this operation`. As a work-around do an 489 `rclone delete dropbox:dir` followed by an `rclone rmdir dropbox:dir`. 490 491 When using `rclone link` you'll need to set `--expire` if using a 492 non-personal account otherwise the visibility may not be correct. 493 (Note that `--expire` isn't supported on personal accounts). See the 494 [forum discussion](https://forum.rclone.org/t/rclone-link-dropbox-permissions/23211) and the 495 [dropbox SDK issue](https://github.com/dropbox/dropbox-sdk-go-unofficial/issues/75). 496 497 ## Get your own Dropbox App ID 498 499 When you use rclone with Dropbox in its default configuration you are using rclone's App ID. This is shared between all the rclone users. 500 501 Here is how to create your own Dropbox App ID for rclone: 502 503 1. Log into the [Dropbox App console](https://www.dropbox.com/developers/apps/create) with your Dropbox Account (It need not 504 to be the same account as the Dropbox you want to access) 505 506 2. Choose an API => Usually this should be `Dropbox API` 507 508 3. Choose the type of access you want to use => `Full Dropbox` or `App Folder`. If you want to use Team Folders, `Full Dropbox` is required ([see here](https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-create-team-folder-inside-my-app-s-folder/m-p/601005/highlight/true#M27911)). 509 510 4. Name your App. The app name is global, so you can't use `rclone` for example 511 512 5. Click the button `Create App` 513 514 6. Switch to the `Permissions` tab. Enable at least the following permissions: `account_info.read`, `files.metadata.write`, `files.content.write`, `files.content.read`, `sharing.write`. The `files.metadata.read` and `sharing.read` checkboxes will be marked too. Click `Submit` 515 516 7. Switch to the `Settings` tab. Fill `OAuth2 - Redirect URIs` as `http://localhost:53682/` and click on `Add` 517 518 8. 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`