2015-12-30 13:45:43 +01:00
|
|
|
---
|
|
|
|
title: "Yandex"
|
|
|
|
description: "Yandex Disk"
|
2022-11-17 18:56:24 +01:00
|
|
|
versionIntroduced: "v1.26"
|
2015-12-30 13:45:43 +01:00
|
|
|
---
|
|
|
|
|
2022-11-19 12:50:20 +01:00
|
|
|
# {{< icon "fa fa-space-shuttle" >}} Yandex Disk
|
2015-12-30 13:45:43 +01:00
|
|
|
|
2017-03-29 14:38:34 +02:00
|
|
|
[Yandex Disk](https://disk.yandex.com) is a cloud storage solution created by [Yandex](https://yandex.com).
|
2015-12-30 13:45:43 +01:00
|
|
|
|
2021-10-14 15:40:18 +02:00
|
|
|
## Configuration
|
|
|
|
|
2015-12-30 13:45:43 +01:00
|
|
|
Here is an example of making a yandex configuration. First run
|
|
|
|
|
|
|
|
rclone config
|
|
|
|
|
|
|
|
This will guide you through an interactive setup process:
|
|
|
|
|
|
|
|
```
|
2021-11-01 21:34:46 +01:00
|
|
|
No remotes found, make a new one?
|
2015-12-30 13:45:43 +01:00
|
|
|
n) New remote
|
2016-02-21 14:39:04 +01:00
|
|
|
s) Set configuration password
|
|
|
|
n/s> n
|
2015-12-30 13:45:43 +01:00
|
|
|
name> remote
|
2016-02-21 14:39:04 +01:00
|
|
|
Type of storage to configure.
|
|
|
|
Choose a number from below, or type in your own value
|
2019-08-26 11:47:17 +02:00
|
|
|
[snip]
|
|
|
|
XX / Yandex Disk
|
2016-02-21 14:39:04 +01:00
|
|
|
\ "yandex"
|
2019-08-26 11:47:17 +02:00
|
|
|
[snip]
|
|
|
|
Storage> yandex
|
2015-12-30 13:45:43 +01:00
|
|
|
Yandex Client Id - leave blank normally.
|
2017-01-09 06:09:19 +01:00
|
|
|
client_id>
|
2015-12-30 13:45:43 +01:00
|
|
|
Yandex Client Secret - leave blank normally.
|
2017-01-09 06:09:19 +01:00
|
|
|
client_secret>
|
2015-12-30 13:45:43 +01:00
|
|
|
Remote config
|
2022-12-07 20:44:28 +01:00
|
|
|
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.
|
2016-02-21 14:39:04 +01:00
|
|
|
y) Yes
|
|
|
|
n) No
|
|
|
|
y/n> y
|
2015-12-30 13:45:43 +01: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
|
2024-08-16 12:05:43 +02:00
|
|
|
Configuration complete.
|
|
|
|
Options:
|
|
|
|
- type: yandex
|
|
|
|
- client_id:
|
|
|
|
- client_secret:
|
|
|
|
- token: {"access_token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","token_type":"OAuth","expiry":"2016-12-29T12:27:11.362788025Z"}
|
|
|
|
Keep this "remote" remote?
|
2015-12-30 13:45:43 +01:00
|
|
|
y) Yes this is OK
|
|
|
|
e) Edit this remote
|
|
|
|
d) Delete this remote
|
|
|
|
y/e/d> y
|
|
|
|
```
|
|
|
|
|
2016-01-07 16:20:32 +01:00
|
|
|
See the [remote setup docs](/remote_setup/) for how to set it up on a
|
|
|
|
machine with no Internet browser available.
|
|
|
|
|
|
|
|
Note that rclone runs a webserver on your local machine to collect the
|
|
|
|
token as returned from Yandex Disk. This only runs from the moment it
|
|
|
|
opens your browser to the moment you get back the verification 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,
|
2015-12-30 13:45:43 +01:00
|
|
|
|
|
|
|
See top level directories
|
|
|
|
|
|
|
|
rclone lsd remote:
|
|
|
|
|
|
|
|
Make a new directory
|
|
|
|
|
|
|
|
rclone mkdir remote:directory
|
|
|
|
|
|
|
|
List the contents of a directory
|
|
|
|
|
|
|
|
rclone ls remote:directory
|
|
|
|
|
|
|
|
Sync `/home/local/directory` to the remote path, deleting any
|
|
|
|
excess files in the path.
|
|
|
|
|
2023-01-20 21:47:36 +01:00
|
|
|
rclone sync --interactive /home/local/directory remote:directory
|
2015-12-30 13:45:43 +01:00
|
|
|
|
2020-10-13 23:49:58 +02:00
|
|
|
Yandex paths may be as deep as required, e.g. `remote:directory/subdirectory`.
|
2019-10-05 11:22:43 +02:00
|
|
|
|
2023-11-18 13:36:46 +01:00
|
|
|
### Modification times and hashes
|
2015-12-30 13:45:43 +01:00
|
|
|
|
|
|
|
Modified times are supported and are stored accurate to 1 ns in custom
|
|
|
|
metadata called `rclone_modified` in RFC3339 with nanoseconds format.
|
|
|
|
|
2023-11-18 13:36:46 +01:00
|
|
|
The MD5 hash algorithm is natively supported by Yandex Disk.
|
2017-09-07 19:10:39 +02:00
|
|
|
|
2021-10-14 15:40:18 +02:00
|
|
|
### Emptying Trash
|
2017-09-07 19:10:39 +02:00
|
|
|
|
|
|
|
If you wish to empty your trash you can use the `rclone cleanup remote:`
|
|
|
|
command which will permanently delete all your trashed files. This command
|
|
|
|
does not take any path arguments.
|
2018-10-01 19:36:15 +02:00
|
|
|
|
2021-10-14 15:40:18 +02:00
|
|
|
### Quota information
|
2018-11-19 18:52:36 +01:00
|
|
|
|
|
|
|
To view your current quota you can use the `rclone about remote:`
|
|
|
|
command which will display your usage limit (quota) and the current usage.
|
|
|
|
|
2021-10-14 15:40:18 +02:00
|
|
|
### Restricted filename characters
|
2019-10-05 11:22:43 +02:00
|
|
|
|
|
|
|
The [default restricted characters set](/overview/#restricted-characters)
|
|
|
|
are replaced.
|
|
|
|
|
|
|
|
Invalid UTF-8 bytes will also be [replaced](/overview/#invalid-utf8),
|
|
|
|
as they can't be used in JSON strings.
|
|
|
|
|
2020-05-22 13:22:52 +02:00
|
|
|
{{< rem autogenerated options start" - DO NOT EDIT - instead edit fs.RegInfo in backend/yandex/yandex.go then run make backenddocs" >}}
|
2021-11-01 16:42:05 +01:00
|
|
|
### Standard options
|
2018-10-01 21:48:54 +02:00
|
|
|
|
2022-07-09 19:08:20 +02:00
|
|
|
Here are the Standard options specific to yandex (Yandex Disk).
|
2018-10-01 21:48:54 +02:00
|
|
|
|
|
|
|
#### --yandex-client-id
|
|
|
|
|
2021-11-01 16:42:05 +01:00
|
|
|
OAuth Client Id.
|
|
|
|
|
2018-10-01 21:48:54 +02:00
|
|
|
Leave blank normally.
|
|
|
|
|
2022-03-18 13:29:54 +01:00
|
|
|
Properties:
|
|
|
|
|
2018-10-01 21:48:54 +02:00
|
|
|
- Config: client_id
|
|
|
|
- Env Var: RCLONE_YANDEX_CLIENT_ID
|
|
|
|
- Type: string
|
2022-03-18 13:29:54 +01:00
|
|
|
- Required: false
|
2018-10-01 21:48:54 +02:00
|
|
|
|
|
|
|
#### --yandex-client-secret
|
|
|
|
|
2021-11-01 16:42:05 +01:00
|
|
|
OAuth Client Secret.
|
|
|
|
|
2018-10-01 21:48:54 +02:00
|
|
|
Leave blank normally.
|
|
|
|
|
2022-03-18 13:29:54 +01:00
|
|
|
Properties:
|
|
|
|
|
2018-10-01 21:48:54 +02:00
|
|
|
- Config: client_secret
|
|
|
|
- Env Var: RCLONE_YANDEX_CLIENT_SECRET
|
|
|
|
- Type: string
|
2022-03-18 13:29:54 +01:00
|
|
|
- Required: false
|
2018-10-01 21:48:54 +02:00
|
|
|
|
2021-11-01 16:42:05 +01:00
|
|
|
### Advanced options
|
2018-11-24 14:44:25 +01:00
|
|
|
|
2022-07-09 19:08:20 +02:00
|
|
|
Here are the Advanced options specific to yandex (Yandex Disk).
|
2018-11-24 14:44:25 +01:00
|
|
|
|
2020-09-02 17:59:04 +02:00
|
|
|
#### --yandex-token
|
2018-11-24 14:44:25 +01:00
|
|
|
|
2020-09-02 17:59:04 +02:00
|
|
|
OAuth Access Token as a JSON blob.
|
2018-11-24 14:44:25 +01:00
|
|
|
|
2022-03-18 13:29:54 +01:00
|
|
|
Properties:
|
|
|
|
|
2020-09-02 17:59:04 +02:00
|
|
|
- Config: token
|
|
|
|
- Env Var: RCLONE_YANDEX_TOKEN
|
|
|
|
- Type: string
|
2022-03-18 13:29:54 +01:00
|
|
|
- Required: false
|
2020-09-02 17:59:04 +02:00
|
|
|
|
|
|
|
#### --yandex-auth-url
|
|
|
|
|
|
|
|
Auth server URL.
|
2021-11-01 16:42:05 +01:00
|
|
|
|
2020-09-02 17:59:04 +02:00
|
|
|
Leave blank to use the provider defaults.
|
|
|
|
|
2022-03-18 13:29:54 +01:00
|
|
|
Properties:
|
|
|
|
|
2020-09-02 17:59:04 +02:00
|
|
|
- Config: auth_url
|
|
|
|
- Env Var: RCLONE_YANDEX_AUTH_URL
|
|
|
|
- Type: string
|
2022-03-18 13:29:54 +01:00
|
|
|
- Required: false
|
2020-09-02 17:59:04 +02:00
|
|
|
|
|
|
|
#### --yandex-token-url
|
|
|
|
|
|
|
|
Token server url.
|
2021-11-01 16:42:05 +01:00
|
|
|
|
2020-09-02 17:59:04 +02:00
|
|
|
Leave blank to use the provider defaults.
|
|
|
|
|
2022-03-18 13:29:54 +01:00
|
|
|
Properties:
|
|
|
|
|
2020-09-02 17:59:04 +02:00
|
|
|
- Config: token_url
|
|
|
|
- Env Var: RCLONE_YANDEX_TOKEN_URL
|
|
|
|
- Type: string
|
2022-03-18 13:29:54 +01:00
|
|
|
- Required: false
|
2018-11-24 14:44:25 +01:00
|
|
|
|
2021-11-15 08:58:38 +01:00
|
|
|
#### --yandex-hard-delete
|
|
|
|
|
|
|
|
Delete files permanently rather than putting them into the trash.
|
|
|
|
|
2022-03-18 13:29:54 +01:00
|
|
|
Properties:
|
|
|
|
|
2021-11-15 08:58:38 +01:00
|
|
|
- Config: hard_delete
|
|
|
|
- Env Var: RCLONE_YANDEX_HARD_DELETE
|
|
|
|
- Type: bool
|
|
|
|
- Default: false
|
|
|
|
|
2020-02-01 11:31:42 +01:00
|
|
|
#### --yandex-encoding
|
|
|
|
|
2022-03-18 13:29:54 +01:00
|
|
|
The encoding for the backend.
|
2020-02-01 11:31:42 +01:00
|
|
|
|
2021-11-01 16:42:05 +01:00
|
|
|
See the [encoding section in the overview](/overview/#encoding) for more info.
|
2020-02-01 11:31:42 +01:00
|
|
|
|
2022-03-18 13:29:54 +01:00
|
|
|
Properties:
|
|
|
|
|
2020-02-01 11:31:42 +01:00
|
|
|
- Config: encoding
|
|
|
|
- Env Var: RCLONE_YANDEX_ENCODING
|
2023-11-26 16:59:12 +01:00
|
|
|
- Type: Encoding
|
2020-02-01 11:31:42 +01:00
|
|
|
- Default: Slash,Del,Ctl,InvalidUtf8,Dot
|
|
|
|
|
2024-08-29 19:25:08 +02:00
|
|
|
#### --yandex-spoof-ua
|
|
|
|
|
|
|
|
Set the user agent to match an official version of the yandex disk client. May help with upload performance.
|
|
|
|
|
|
|
|
Properties:
|
|
|
|
|
|
|
|
- Config: spoof_ua
|
|
|
|
- Env Var: RCLONE_YANDEX_SPOOF_UA
|
|
|
|
- Type: bool
|
|
|
|
- Default: true
|
|
|
|
|
2024-03-10 12:22:43 +01:00
|
|
|
#### --yandex-description
|
|
|
|
|
2024-06-14 17:04:51 +02:00
|
|
|
Description of the remote.
|
2024-03-10 12:22:43 +01:00
|
|
|
|
|
|
|
Properties:
|
|
|
|
|
|
|
|
- Config: description
|
|
|
|
- Env Var: RCLONE_YANDEX_DESCRIPTION
|
|
|
|
- Type: string
|
|
|
|
- Required: false
|
|
|
|
|
2020-05-22 13:22:52 +02:00
|
|
|
{{< rem autogenerated options stop >}}
|
2021-10-14 15:40:18 +02:00
|
|
|
|
|
|
|
## Limitations
|
|
|
|
|
|
|
|
When uploading very large files (bigger than about 5 GiB) you will need
|
|
|
|
to increase the `--timeout` parameter. This is because Yandex pauses
|
|
|
|
(perhaps to calculate the MD5SUM for the entire file) before returning
|
|
|
|
confirmation that the file has been uploaded. The default handling of
|
|
|
|
timeouts in rclone is to assume a 5 minute pause is an error and close
|
|
|
|
the connection - you'll see `net/http: timeout awaiting response
|
|
|
|
headers` errors in the logs if this is happening. Setting the timeout
|
|
|
|
to twice the max size of file in GiB should be enough, so if you want
|
|
|
|
to upload a 30 GiB file set a timeout of `2 * 30 = 60m`, that is
|
|
|
|
`--timeout 60m`.
|
|
|
|
|
|
|
|
Having a Yandex Mail account is mandatory to use the Yandex.Disk subscription.
|
|
|
|
Token generation will work without a mail account, but Rclone won't be able to complete any actions.
|
|
|
|
```
|
|
|
|
[403 - DiskUnsupportedUserAccountTypeError] User account type is not supported.
|
|
|
|
```
|