mirror of
https://github.com/rclone/rclone.git
synced 2024-12-13 02:33:58 +01:00
6381959850
* add support to hashing module * add dbhashsum to list the hashes * add support to dropbox module This means objects up and downloaded to/from Dropbox will have their hashes checked. Note after this change local objects are calculating MD5, SHA1 and DBHASH which is excessive and needs to be fixed.
134 lines
3.5 KiB
Markdown
134 lines
3.5 KiB
Markdown
---
|
|
title: "Dropbox"
|
|
description: "Rclone docs for Dropbox"
|
|
date: "2016-02-21"
|
|
---
|
|
|
|
<i class="fa fa-dropbox"></i> Dropbox
|
|
---------------------------------
|
|
|
|
Paths are specified as `remote:path`
|
|
|
|
Dropbox paths may be as deep as required, eg
|
|
`remote:directory/subdirectory`.
|
|
|
|
The initial setup for dropbox involves getting a token from Dropbox
|
|
which you need to do in your browser. `rclone config` walks you
|
|
through it.
|
|
|
|
Here is an example of how to make a remote called `remote`. First run:
|
|
|
|
rclone config
|
|
|
|
This will guide you through an interactive setup process:
|
|
|
|
```
|
|
n) New remote
|
|
d) Delete remote
|
|
q) Quit config
|
|
e/n/d/q> n
|
|
name> remote
|
|
Type of storage to configure.
|
|
Choose a number from below, or type in your own value
|
|
1 / Amazon Drive
|
|
\ "amazon cloud drive"
|
|
2 / Amazon S3 (also Dreamhost, Ceph, Minio)
|
|
\ "s3"
|
|
3 / Backblaze B2
|
|
\ "b2"
|
|
4 / Dropbox
|
|
\ "dropbox"
|
|
5 / Encrypt/Decrypt a remote
|
|
\ "crypt"
|
|
6 / Google Cloud Storage (this is not Google Drive)
|
|
\ "google cloud storage"
|
|
7 / Google Drive
|
|
\ "drive"
|
|
8 / Hubic
|
|
\ "hubic"
|
|
9 / Local Disk
|
|
\ "local"
|
|
10 / Microsoft OneDrive
|
|
\ "onedrive"
|
|
11 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
|
|
\ "swift"
|
|
12 / SSH/SFTP Connection
|
|
\ "sftp"
|
|
13 / Yandex Disk
|
|
\ "yandex"
|
|
Storage> 4
|
|
Dropbox App Key - leave blank normally.
|
|
app_key>
|
|
Dropbox App Secret - leave blank normally.
|
|
app_secret>
|
|
Remote config
|
|
Please visit:
|
|
https://www.dropbox.com/1/oauth2/authorize?client_id=XXXXXXXXXXXXXXX&response_type=code
|
|
Enter the code: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX_XXXXXXXXXX
|
|
--------------------
|
|
[remote]
|
|
app_key =
|
|
app_secret =
|
|
token = XXXXXXXXXXXXXXXXXXXXXXXXXXXXX_XXXX_XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
|
--------------------
|
|
y) Yes this is OK
|
|
e) Edit this remote
|
|
d) Delete this remote
|
|
y/e/d> y
|
|
```
|
|
|
|
You can then use it like this,
|
|
|
|
List directories in top level of your dropbox
|
|
|
|
rclone lsd remote:
|
|
|
|
List all the files in your dropbox
|
|
|
|
rclone ls remote:
|
|
|
|
To copy a local directory to a dropbox directory called backup
|
|
|
|
rclone copy /home/source remote:backup
|
|
|
|
### Modified time and Hashes ###
|
|
|
|
Dropbox supports modified times, but the only way to set a
|
|
modification time is to re-upload the file.
|
|
|
|
This means that if you uploaded your data with an older version of
|
|
rclone which didn't support the v2 API and modified times, rclone will
|
|
decide to upload all your old data to fix the modification times. If
|
|
you don't want this to happen use `--size-only` or `--checksum` flag
|
|
to stop it.
|
|
|
|
Dropbox supports [its own hash
|
|
type](https://www.dropbox.com/developers/reference/content-hash) which
|
|
is checked for all transfers.
|
|
|
|
### Specific options ###
|
|
|
|
Here are the command line options specific to this cloud storage
|
|
system.
|
|
|
|
#### --dropbox-chunk-size=SIZE ####
|
|
|
|
Upload chunk size. Max 150M. The default is 128MB. Note that this
|
|
isn't buffered into memory.
|
|
|
|
### Limitations ###
|
|
|
|
Note that Dropbox is case insensitive so you can't have a file called
|
|
"Hello.doc" and one called "hello.doc".
|
|
|
|
There are some file names such as `thumbs.db` which Dropbox can't
|
|
store. There is a full list of them in the ["Ignored Files" section
|
|
of this document](https://www.dropbox.com/en/help/145). Rclone will
|
|
issue an error message `File name disallowed - not uploading` if it
|
|
attempt to upload one of those file names, but the sync won't fail.
|
|
|
|
If you have more than 10,000 files in a directory then `rclone purge
|
|
dropbox:dir` will return the error `Failed to purge: There are too
|
|
many files involved in this operation`. As a work-around do an
|
|
`rclone delete dropbox:dir` followed by an `rclone rmdir dropbox:dir`.
|