OpenDrive
OpenDrive
路径指定为 remote:path
路径可以按需设置深度,例如 remote:directory/subdirectory
。
配置
以下是一个如何创建名为 remote
的远程存储的示例。首先运行:
rclone config
这将引导你完成一个交互式的设置过程:
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
[snip]
XX / OpenDrive
\ "opendrive"
[snip]
Storage> opendrive
Username
username>
Password
y) Yes type in my own password
g) Generate random password
y/g> y
Enter the password:
password:
Confirm the password:
password:
Configuration complete.
Options:
- type: opendrive
- username:
- password: *** ENCRYPTED ***
Keep this "remote" remote?
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y
修改时间和哈希值
OpenDrive 允许将对象的修改时间精确设置到 1 秒。这些修改时间将用于检测对象是否需要同步。
支持 MD5 哈希算法。
受限文件名字符
字符 | 编码值 | 替换字符 |
---|---|---|
NUL | 0x00 | ␀ |
/ | 0x2F | / |
" | 0x22 | " |
* | 0x2A | * |
: | 0x3A | : |
< | 0x3C | < |
> | 0x3E | > |
? | 0x3F | ? |
\ | 0x5C | \ |
| | 0x7C | | |
文件名也不能以以下字符开头或结尾。只有当这些字符是文件名的第一个或最后一个字符时才会被替换:
字符 | 编码值 | 替换字符 |
---|---|---|
SP | 0x20 | ␠ |
HT | 0x09 | ␉ |
LF | 0x0A | ␊ |
VT | 0x0B | ␋ |
CR | 0x0D | ␍ |
无效的 UTF - 8 字节也会被 替换,因为它们不能用于 JSON 字符串。
标准选项
以下是 OpenDrive 特定的标准选项。
–opendrive-username
用户名。
属性:
- 配置项:username
- 环境变量:RCLONE_OPENDRIVE_USERNAME
- 类型:字符串
- 是否必需:是
–opendrive-password
密码。
注意:输入此选项的值必须进行加密处理 - 请参阅 rclone obscure。
属性:
- 配置项:password
- 环境变量:RCLONE_OPENDRIVE_PASSWORD
- 类型:字符串
- 是否必需:是
高级选项
以下是 OpenDrive 特定的高级选项。
–opendrive-encoding
后端的编码方式。
有关更多信息,请参阅 概述中的编码部分。
属性:
- 配置项:encoding
- 环境变量:RCLONE_OPENDRIVE_ENCODING
- 类型:Encoding
- 默认值:Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,LeftSpace,LeftCrLfHtVt,RightSpace,RightCrLfHtVt,InvalidUtf8,Dot
–opendrive-chunk-size
文件将以该大小的块进行上传。
请注意,这些块会存储在内存中,因此增加块大小会增加内存使用量。
属性:
- 配置项:chunk_size
- 环境变量:RCLONE_OPENDRIVE_CHUNK_SIZE
- 类型:SizeSuffix
- 默认值:10Mi
–opendrive-description
远程存储的描述。
属性:
- 配置项:description
- 环境变量:RCLONE_OPENDRIVE_DESCRIPTION
- 类型:字符串
- 是否必需:否
限制
请注意,OpenDrive 不区分大小写,因此你不能同时拥有名为 “Hello.doc” 和 “hello.doc” 的文件。
OpenDrive 文件名中有很多字符是不允许使用的。这些字符在 Windows 平台上不会出现,但在非 Windows 平台上很常见。Rclone 会将这些文件名映射为看起来相同的 Unicode 等效字符。例如,如果文件中包含 ?
,它将被映射为 ?
。
OpenDrive 后端不支持 rclone about
命令。不具备此功能的后端无法确定 rclone 挂载的可用空间,也不能在 rclone 联合远程存储中使用 mfs
(最大可用空间)策略。