2015-09-02 22:37:42 +00:00
|
|
|
---
|
2016-07-11 11:42:44 +00:00
|
|
|
title: "Amazon Drive"
|
|
|
|
description: "Rclone docs for Amazon Drive"
|
|
|
|
date: "2016-07-11"
|
2015-09-02 22:37:42 +00:00
|
|
|
---
|
|
|
|
|
2016-07-11 11:42:44 +00:00
|
|
|
<i class="fa fa-amazon"></i> Amazon Drive
|
2015-09-02 22:37:42 +00:00
|
|
|
-----------------------------------------
|
|
|
|
|
|
|
|
Paths are specified as `remote:path`
|
|
|
|
|
|
|
|
Paths may be as deep as required, eg `remote:directory/subdirectory`.
|
|
|
|
|
2016-07-11 11:42:44 +00:00
|
|
|
The initial setup for Amazon Drive involves getting a token from
|
2015-09-02 22:37:42 +00:00
|
|
|
Amazon 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
|
2016-02-21 13:39:04 +00:00
|
|
|
Type of storage to configure.
|
|
|
|
Choose a number from below, or type in your own value
|
2016-07-11 11:42:44 +00:00
|
|
|
1 / Amazon Drive
|
2016-02-21 13:39:04 +00:00
|
|
|
\ "amazon cloud drive"
|
2017-01-09 05:09:19 +00:00
|
|
|
2 / Amazon S3 (also Dreamhost, Ceph, Minio)
|
2016-02-21 13:39:04 +00:00
|
|
|
\ "s3"
|
|
|
|
3 / Backblaze B2
|
|
|
|
\ "b2"
|
|
|
|
4 / Dropbox
|
|
|
|
\ "dropbox"
|
2017-01-09 05:09:19 +00:00
|
|
|
5 / Encrypt/Decrypt a remote
|
|
|
|
\ "crypt"
|
|
|
|
6 / Google Cloud Storage (this is not Google Drive)
|
2016-02-21 13:39:04 +00:00
|
|
|
\ "google cloud storage"
|
2017-01-09 05:09:19 +00:00
|
|
|
7 / Google Drive
|
2016-02-21 13:39:04 +00:00
|
|
|
\ "drive"
|
2017-01-09 05:09:19 +00:00
|
|
|
8 / Hubic
|
2016-02-21 13:39:04 +00:00
|
|
|
\ "hubic"
|
2017-01-09 05:09:19 +00:00
|
|
|
9 / Local Disk
|
2016-02-21 13:39:04 +00:00
|
|
|
\ "local"
|
2017-01-09 05:09:19 +00:00
|
|
|
10 / Microsoft OneDrive
|
2016-02-21 13:39:04 +00:00
|
|
|
\ "onedrive"
|
2017-01-09 05:09:19 +00:00
|
|
|
11 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
|
2016-02-21 13:39:04 +00:00
|
|
|
\ "swift"
|
2017-03-05 10:14:57 +00:00
|
|
|
12 / SSH/SFTP Connection
|
|
|
|
\ "sftp"
|
|
|
|
13 / Yandex Disk
|
2016-02-21 13:39:04 +00:00
|
|
|
\ "yandex"
|
|
|
|
Storage> 1
|
2015-10-03 13:23:12 +00:00
|
|
|
Amazon Application Client Id - leave blank normally.
|
2017-01-09 05:09:19 +00:00
|
|
|
client_id>
|
2015-10-03 13:23:12 +00:00
|
|
|
Amazon Application Client Secret - leave blank normally.
|
2017-01-09 05:09:19 +00:00
|
|
|
client_secret>
|
2015-09-02 22:37:42 +00:00
|
|
|
Remote config
|
2017-01-09 05:09:19 +00:00
|
|
|
Use auto config?
|
|
|
|
* Say Y if not sure
|
|
|
|
* Say N if you are working on a remote or headless machine
|
|
|
|
y) Yes
|
|
|
|
n) No
|
|
|
|
y/n> y
|
2015-09-11 12:26:51 +00:00
|
|
|
If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth
|
|
|
|
Log in and authorize rclone for access
|
|
|
|
Waiting for code...
|
|
|
|
Got code
|
2015-09-02 22:37:42 +00:00
|
|
|
--------------------
|
|
|
|
[remote]
|
2017-01-09 05:09:19 +00:00
|
|
|
client_id =
|
|
|
|
client_secret =
|
2015-09-02 22:37:42 +00:00
|
|
|
token = {"access_token":"xxxxxxxxxxxxxxxxxxxxxxx","token_type":"bearer","refresh_token":"xxxxxxxxxxxxxxxxxx","expiry":"2015-09-06T16:07:39.658438471+01:00"}
|
|
|
|
--------------------
|
|
|
|
y) Yes this is OK
|
|
|
|
e) Edit this remote
|
|
|
|
d) Delete this remote
|
|
|
|
y/e/d> y
|
|
|
|
```
|
|
|
|
|
2016-01-07 15:20:32 +00:00
|
|
|
See the [remote setup docs](/remote_setup/) for how to set it up on a
|
|
|
|
machine with no Internet browser available.
|
|
|
|
|
2015-09-02 22:37:42 +00:00
|
|
|
Note that rclone runs a webserver on your local machine to collect the
|
2015-09-11 12:26:51 +00:00
|
|
|
token as returned from Amazon. This only runs from the moment it
|
|
|
|
opens your browser to the moment you get back the verification
|
2015-09-02 22:37:42 +00:00
|
|
|
code. This is on `http://127.0.0.1:53682/` and this it may require
|
|
|
|
you to unblock it temporarily if you are running a host firewall.
|
|
|
|
|
|
|
|
Once configured you can then use `rclone` like this,
|
|
|
|
|
2016-07-11 11:42:44 +00:00
|
|
|
List directories in top level of your Amazon Drive
|
2015-09-02 22:37:42 +00:00
|
|
|
|
|
|
|
rclone lsd remote:
|
|
|
|
|
2016-07-11 11:42:44 +00:00
|
|
|
List all the files in your Amazon Drive
|
2015-09-02 22:37:42 +00:00
|
|
|
|
|
|
|
rclone ls remote:
|
|
|
|
|
2016-07-11 11:42:44 +00:00
|
|
|
To copy a local directory to an Amazon Drive directory called backup
|
2015-09-02 22:37:42 +00:00
|
|
|
|
|
|
|
rclone copy /home/source remote:backup
|
|
|
|
|
|
|
|
### Modified time and MD5SUMs ###
|
|
|
|
|
2016-07-11 11:42:44 +00:00
|
|
|
Amazon Drive doesn't allow modification times to be changed via
|
2015-09-02 22:37:42 +00:00
|
|
|
the API so these won't be accurate or used for syncing.
|
|
|
|
|
|
|
|
It does store MD5SUMs so for a more accurate sync, you can use the
|
|
|
|
`--checksum` flag.
|
|
|
|
|
|
|
|
### Deleting files ###
|
|
|
|
|
|
|
|
Any files you delete with rclone will end up in the trash. Amazon
|
|
|
|
don't provide an API to permanently delete files, nor to empty the
|
|
|
|
trash, so you will have to do that with one of Amazon's apps or via
|
2017-01-08 16:24:03 +00:00
|
|
|
the Amazon Drive website. As of November 17, 2016, files are
|
|
|
|
automatically deleted by Amazon from the trash after 30 days.
|
2015-09-02 22:37:42 +00:00
|
|
|
|
2016-10-18 16:33:41 +00:00
|
|
|
### Using with non `.com` Amazon accounts ###
|
|
|
|
|
|
|
|
Let's say you usually use `amazon.co.uk`. When you authenticate with
|
|
|
|
rclone it will take you to an `amazon.com` page to log in. Your
|
|
|
|
`amazon.co.uk` email and password should work here just fine.
|
|
|
|
|
2016-01-30 18:08:44 +00:00
|
|
|
### Specific options ###
|
|
|
|
|
|
|
|
Here are the command line options specific to this cloud storage
|
|
|
|
system.
|
|
|
|
|
|
|
|
#### --acd-templink-threshold=SIZE ####
|
|
|
|
|
|
|
|
Files this size or more will be downloaded via their `tempLink`. This
|
2016-07-11 11:42:44 +00:00
|
|
|
is to work around a problem with Amazon Drive which blocks downloads
|
|
|
|
of files bigger than about 10GB. The default for this is 9GB which
|
|
|
|
shouldn't need to be changed.
|
2016-01-30 18:08:44 +00:00
|
|
|
|
|
|
|
To download files above this threshold, rclone requests a `tempLink`
|
|
|
|
which downloads the file through a temporary URL directly from the
|
|
|
|
underlying S3 storage.
|
|
|
|
|
2016-11-05 13:57:03 +00:00
|
|
|
#### --acd-upload-wait-per-gb=TIME ####
|
2016-08-18 16:49:49 +00:00
|
|
|
|
|
|
|
Sometimes Amazon Drive gives an error when a file has been fully
|
|
|
|
uploaded but the file appears anyway after a little while. This
|
2016-10-17 15:18:56 +00:00
|
|
|
happens sometimes for files over 1GB in size and nearly every time for
|
2016-11-05 13:57:03 +00:00
|
|
|
files bigger than 10GB. This parameter controls the time rclone waits
|
2016-10-17 15:18:56 +00:00
|
|
|
for the file to appear.
|
|
|
|
|
2016-11-05 13:57:03 +00:00
|
|
|
The default value for this parameter is 3 minutes per GB, so by
|
|
|
|
default it will wait 3 minutes for every GB uploaded to see if the
|
|
|
|
file appears.
|
2016-10-17 15:18:56 +00:00
|
|
|
|
2016-11-05 13:57:03 +00:00
|
|
|
You can disable this feature by setting it to 0. This may cause
|
|
|
|
conflict errors as rclone retries the failed upload but the file will
|
|
|
|
most likely appear correctly eventually.
|
2016-10-17 15:18:56 +00:00
|
|
|
|
|
|
|
These values were determined empirically by observing lots of uploads
|
|
|
|
of big files for a range of file sizes.
|
|
|
|
|
|
|
|
Upload with the `-v` flag to see more info about what rclone is doing
|
|
|
|
in this situation.
|
2016-08-18 16:49:49 +00:00
|
|
|
|
2015-09-02 22:37:42 +00:00
|
|
|
### Limitations ###
|
|
|
|
|
2016-07-11 11:42:44 +00:00
|
|
|
Note that Amazon Drive is case insensitive so you can't have a
|
2015-09-02 22:37:42 +00:00
|
|
|
file called "Hello.doc" and one called "hello.doc".
|
|
|
|
|
2016-07-11 11:42:44 +00:00
|
|
|
Amazon Drive has rate limiting so you may notice errors in the
|
2015-09-02 22:37:42 +00:00
|
|
|
sync (429 errors). rclone will automatically retry the sync up to 3
|
|
|
|
times by default (see `--retries` flag) which should hopefully work
|
|
|
|
around this problem.
|
2016-01-04 12:23:33 +00:00
|
|
|
|
2016-07-11 11:42:44 +00:00
|
|
|
Amazon Drive has an internal limit of file sizes that can be uploaded
|
|
|
|
to the service. This limit is not officially published, but all files
|
|
|
|
larger than this will fail.
|
2016-01-04 12:23:33 +00:00
|
|
|
|
|
|
|
At the time of writing (Jan 2016) is in the area of 50GB per file.
|
|
|
|
This means that larger files are likely to fail.
|
|
|
|
|
2017-03-19 00:18:04 +00:00
|
|
|
Unfortunately there is no way for rclone to see that this failure is
|
2016-01-04 12:23:33 +00:00
|
|
|
because of file size, so it will retry the operation, as any other
|
2016-11-17 17:30:49 +00:00
|
|
|
failure. To avoid this problem, use `--max-size 50000M` option to limit
|
2016-11-27 18:18:47 +00:00
|
|
|
the maximum size of uploaded files. Note that `--max-size` does not split
|
|
|
|
files into segments, it only ignores files over this size.
|