github.com/xhghs/rclone@v1.51.1-0.20200430155106-e186a28cced8/docs/content/dropbox.md (about)

     1  ---
     2  title: "Dropbox"
     3  description: "Rclone docs for Dropbox"
     4  date: "2016-02-21"
     5  ---
     6  
     7  <i class="fab fa-dropbox"></i> Dropbox
     8  ---------------------------------
     9  
    10  Paths are specified as `remote:path`
    11  
    12  Dropbox paths may be as deep as required, eg
    13  `remote:directory/subdirectory`.
    14  
    15  The initial setup for dropbox involves getting a token from Dropbox
    16  which you need to do in your browser.  `rclone config` walks you
    17  through it.
    18  
    19  Here is an example of how to make a remote called `remote`.  First run:
    20  
    21       rclone config
    22  
    23  This will guide you through an interactive setup process:
    24  
    25  ```
    26  n) New remote
    27  d) Delete remote
    28  q) Quit config
    29  e/n/d/q> n
    30  name> remote
    31  Type of storage to configure.
    32  Choose a number from below, or type in your own value
    33  [snip]
    34  XX / Dropbox
    35     \ "dropbox"
    36  [snip]
    37  Storage> dropbox
    38  Dropbox App Key - leave blank normally.
    39  app_key>
    40  Dropbox App Secret - leave blank normally.
    41  app_secret>
    42  Remote config
    43  Please visit:
    44  https://www.dropbox.com/1/oauth2/authorize?client_id=XXXXXXXXXXXXXXX&response_type=code
    45  Enter the code: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX_XXXXXXXXXX
    46  --------------------
    47  [remote]
    48  app_key =
    49  app_secret =
    50  token = XXXXXXXXXXXXXXXXXXXXXXXXXXXXX_XXXX_XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    51  --------------------
    52  y) Yes this is OK
    53  e) Edit this remote
    54  d) Delete this remote
    55  y/e/d> y
    56  ```
    57  
    58  You can then use it like this,
    59  
    60  List directories in top level of your dropbox
    61  
    62      rclone lsd remote:
    63  
    64  List all the files in your dropbox
    65  
    66      rclone ls remote:
    67  
    68  To copy a local directory to a dropbox directory called backup
    69  
    70      rclone copy /home/source remote:backup
    71  
    72  ### Dropbox for business ###
    73  
    74  Rclone supports Dropbox for business and Team Folders.
    75  
    76  When using Dropbox for business `remote:` and `remote:path/to/file`
    77  will refer to your personal folder.
    78  
    79  If you wish to see Team Folders you must use a leading `/` in the
    80  path, so `rclone lsd remote:/` will refer to the root and show you all
    81  Team Folders and your User Folder.
    82  
    83  You can then use team folders like this `remote:/TeamFolder` and
    84  `remote:/TeamFolder/path/to/file`.
    85  
    86  A leading `/` for a Dropbox personal account will do nothing, but it
    87  will take an extra HTTP transaction so it should be avoided.
    88  
    89  ### Modified time and Hashes ###
    90  
    91  Dropbox supports modified times, but the only way to set a
    92  modification time is to re-upload the file.
    93  
    94  This means that if you uploaded your data with an older version of
    95  rclone which didn't support the v2 API and modified times, rclone will
    96  decide to upload all your old data to fix the modification times.  If
    97  you don't want this to happen use `--size-only` or `--checksum` flag
    98  to stop it.
    99  
   100  Dropbox supports [its own hash
   101  type](https://www.dropbox.com/developers/reference/content-hash) which
   102  is checked for all transfers.
   103  
   104  #### Restricted filename characters
   105  
   106  | Character | Value | Replacement |
   107  | --------- |:-----:|:-----------:|
   108  | NUL       | 0x00  | ␀           |
   109  | /         | 0x2F  | /           |
   110  | DEL       | 0x7F  | ␡           |
   111  | \         | 0x5C  | \           |
   112  
   113  File names can also not end with the following characters.
   114  These only get replaced if they are last character in the name:
   115  
   116  | Character | Value | Replacement |
   117  | --------- |:-----:|:-----------:|
   118  | SP        | 0x20  | ␠           |
   119  
   120  Invalid UTF-8 bytes will also be [replaced](/overview/#invalid-utf8),
   121  as they can't be used in JSON strings.
   122  
   123  <!--- autogenerated options start - DO NOT EDIT, instead edit fs.RegInfo in backend/dropbox/dropbox.go then run make backenddocs -->
   124  ### Standard Options
   125  
   126  Here are the standard options specific to dropbox (Dropbox).
   127  
   128  #### --dropbox-client-id
   129  
   130  Dropbox App Client Id
   131  Leave blank normally.
   132  
   133  - Config:      client_id
   134  - Env Var:     RCLONE_DROPBOX_CLIENT_ID
   135  - Type:        string
   136  - Default:     ""
   137  
   138  #### --dropbox-client-secret
   139  
   140  Dropbox App Client Secret
   141  Leave blank normally.
   142  
   143  - Config:      client_secret
   144  - Env Var:     RCLONE_DROPBOX_CLIENT_SECRET
   145  - Type:        string
   146  - Default:     ""
   147  
   148  ### Advanced Options
   149  
   150  Here are the advanced options specific to dropbox (Dropbox).
   151  
   152  #### --dropbox-chunk-size
   153  
   154  Upload chunk size. (< 150M).
   155  
   156  Any files larger than this will be uploaded in chunks of this size.
   157  
   158  Note that chunks are buffered in memory (one at a time) so rclone can
   159  deal with retries.  Setting this larger will increase the speed
   160  slightly (at most 10% for 128MB in tests) at the cost of using more
   161  memory.  It can be set smaller if you are tight on memory.
   162  
   163  - Config:      chunk_size
   164  - Env Var:     RCLONE_DROPBOX_CHUNK_SIZE
   165  - Type:        SizeSuffix
   166  - Default:     48M
   167  
   168  #### --dropbox-impersonate
   169  
   170  Impersonate this user when using a business account.
   171  
   172  - Config:      impersonate
   173  - Env Var:     RCLONE_DROPBOX_IMPERSONATE
   174  - Type:        string
   175  - Default:     ""
   176  
   177  #### --dropbox-encoding
   178  
   179  This sets the encoding for the backend.
   180  
   181  See: the [encoding section in the overview](/overview/#encoding) for more info.
   182  
   183  - Config:      encoding
   184  - Env Var:     RCLONE_DROPBOX_ENCODING
   185  - Type:        MultiEncoder
   186  - Default:     Slash,BackSlash,Del,RightSpace,InvalidUtf8,Dot
   187  
   188  <!--- autogenerated options stop -->
   189  
   190  ### Limitations ###
   191  
   192  Note that Dropbox is case insensitive so you can't have a file called
   193  "Hello.doc" and one called "hello.doc".
   194  
   195  There are some file names such as `thumbs.db` which Dropbox can't
   196  store.  There is a full list of them in the ["Ignored Files" section
   197  of this document](https://www.dropbox.com/en/help/145).  Rclone will
   198  issue an error message `File name disallowed - not uploading` if it
   199  attempts to upload one of those file names, but the sync won't fail.
   200  
   201  If you have more than 10,000 files in a directory then `rclone purge
   202  dropbox:dir` will return the error `Failed to purge: There are too
   203  many files involved in this operation`.  As a work-around do an
   204  `rclone delete dropbox:dir` followed by an `rclone rmdir dropbox:dir`.
   205  
   206  ### Get your own Dropbox App ID ###
   207  
   208  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.
   209  
   210  Here is how to create your own Dropbox App ID for rclone:
   211  
   212  1. Log into the [Dropbox App console](https://www.dropbox.com/developers/apps/create) with your Dropbox Account (It need not
   213  to be the same account as the Dropbox you want to access)
   214  
   215  2. Choose an API => Usually this should be `Dropbox API`
   216  
   217  3. Choose the type of access you want to use => Full Dropbox or App Folder
   218  
   219  4. Name your App
   220  
   221  5. Click the button `Create App`
   222  
   223  6. Find the `App key` and `App secret` Use these values in rclone config to add a new remote or edit an existing remote.