HiDrive
At a glance
Section titled “At a glance”| Capability | Support |
|---|---|
| rclone support tier | Tier 1: Core |
| Checksums | HiDrive hash |
| Modification times | Kept, to 1 s |
| Case-insensitive names | No |
| Duplicate names allowed | No |
| Server-side copy | Yes |
| Server-side move and rename | Yes |
| Folder move and rename | Yes, in one step |
| Free space reporting | No |
| Empty folders | Yes |
| Change notifications | No |
| Uploads of unknown size | Yes |
| Public links | No |
The initial setup for hidrive involves getting a token from HiDrive
which you need to do in your browser.
rclone config walks you through it.
Setup notes
Section titled “Setup notes”In CloudMount you add this drive from the Add drive screen, and the wizard asks for the options listed under Options. The notes below come from rclone’s setup guide.
Keeping your tokens safe
Section titled “Keeping your tokens safe”Any OAuth-tokens will be stored by rclone in the remote’s configuration file as unencrypted text. Anyone can use a valid refresh-token to access your HiDrive filesystem without knowing your password. Therefore you should make sure no one else can access your configuration.
It is possible to encrypt rclone’s configuration file. You can find information on securing your configuration file by viewing the configuration encryption docs.
Invalid refresh token
Section titled “Invalid refresh token”As can be verified on HiDrive’s OAuth guide,
each refresh_token (for Native Applications) is valid for 60 days.
If used to access HiDrivei, its validity will be automatically extended.
This means that if you
- Don’t use the HiDrive remote for 60 days
then rclone will return an error which includes a text that implies the refresh token is invalid or expired.
To fix this you will need to authorize rclone to access your HiDrive account again.
Using
rclone config reconnect remote:the process is very similar to the process of initial setup exemplified before.
Modification times and hashes
Section titled “Modification times and hashes”HiDrive allows modification times to be set on objects accurate to 1 second.
HiDrive supports its own hash type which is used to verify the integrity of file contents after successful transfers.
Restricted filename characters
Section titled “Restricted filename characters”HiDrive cannot store files or folders that include
/ (0x2F) or null-bytes (0x00) in their name.
Any other characters can be used in the names of files or folders.
Additionally, files or folders cannot be named either of the following: . or ..
Therefore rclone will automatically replace these characters, if files or folders are stored or accessed with such names.
You can read about how this filename encoding works in general in the main docs.
Keep in mind that HiDrive only supports file or folder names with a length of 255 characters or less.
Transfers
Section titled “Transfers”HiDrive limits file sizes per single request to a maximum of 2 GiB. To allow storage of larger files and allow for better upload performance, the hidrive backend will use a chunked transfer for files larger than 96 MiB. Rclone will upload multiple parts/chunks of the file at the same time. Chunks in the process of being uploaded are buffered in memory, so you may want to restrict this behaviour on systems with limited resources.
You can customize this behaviour using the following options:
chunk_size: size of file partsupload_cutoff: files larger or equal to this in size will use a chunked transferupload_concurrency: number of file-parts to upload at the same time
See the below section about configuration options for more details.
Root folder
Section titled “Root folder”You can set the root folder for rclone. This is the directory that rclone considers to be the root of your HiDrive.
Usually, you will leave this blank, and rclone will use the root of the account.
However, you can set this to restrict rclone to a specific folder hierarchy.
This works by prepending the contents of the root_prefix option
to any paths accessed by rclone.
For example, the following two ways to access the home directory are equivalent:
rclone lsd --hidrive-root-prefix="/users/test/" remote:pathrclone lsd remote:/users/test/pathSee the below section about configuration options for more details.
Directory member count
Section titled “Directory member count”By default, rclone will know the number of directory members contained in a directory.
For example, rclone lsd uses this information.
The acquisition of this information will result in additional time costs for
HiDrive’s API. When dealing with large directory structures, it may be
desirable to circumvent this time cost, especially when this information is not
explicitly needed. For this, the disable_fetching_member_count option can be used.
See the below section about configuration options for more details.
Options
Section titled “Options”Standard options
Section titled “Standard options”The wizard asks for these when you add the drive.
client_id
Section titled “client_id”OAuth Client Id.
Leave blank normally.
Type: string
client_secret
Section titled “client_secret”OAuth Client Secret.
Leave blank normally.
Type: string
scope_access
Section titled “scope_access”Access permissions that rclone should use when requesting access from HiDrive.
Type: string · Default: rw
Choices:
rw: Read and write access to resources.ro: Read-only access to resources.
Advanced options
Section titled “Advanced options”The wizard shows these under Advanced options. Most drives work without changing any of them.
OAuth Access Token as a JSON blob.
Type: string
auth_url
Section titled “auth_url”Auth server URL.
Leave blank to use the provider defaults.
Type: string
token_url
Section titled “token_url”Token server url.
Leave blank to use the provider defaults.
Type: string
client_credentials
Section titled “client_credentials”Use client credentials OAuth flow.
This will use the OAUTH2 client Credentials Flow as described in RFC 6749.
Note that this option is NOT supported by all backends.
Type: bool · Default: false
scope_role
Section titled “scope_role”User-level that rclone should use when requesting access from HiDrive.
Type: string · Default: user
Choices:
user: User-level access to management permissions. This will be sufficient in most cases.admin: Extensive access to management permissions.owner: Full access to management permissions.
root_prefix
Section titled “root_prefix”The root/parent folder for all paths.
Fill in to use the specified folder as the parent for all paths given to the remote. This way rclone can use any folder as its starting point.
Type: string · Default: /
Choices:
/: The topmost directory accessible by rclone. This will be equivalent with “root” if rclone uses a regular HiDrive user account.root: The topmost directory of the HiDrive user account(empty): This specifies that there is no root-prefix for your paths. When using this you will always need to specify paths to this remote with a valid parent e.g. “remote:/path/to/dir” or “remote:root/path/to/dir”.
endpoint
Section titled “endpoint”Endpoint for the service.
This is the URL that API-calls will be made to.
Type: string · Default: https://api.hidrive.strato.com/2.1
disable_fetching_member_count
Section titled “disable_fetching_member_count”Do not fetch number of objects in directories unless it is absolutely necessary.
Requests may be faster if the number of objects in subdirectories is not fetched.
Type: bool · Default: false
chunk_size
Section titled “chunk_size”Chunksize for chunked uploads.
Any files larger than the configured cutoff (or files of unknown size) will be uploaded in chunks of this size.
The upper limit for this is 2147483647 bytes (about 2.000Gi). That is the maximum amount of bytes a single upload-operation will support. Setting this above the upper limit or to a negative value will cause uploads to fail.
Setting this to larger values may increase the upload speed at the cost of using more memory. It can be set to smaller values smaller to save on memory.
Type: SizeSuffix · Default: 48Mi
upload_cutoff
Section titled “upload_cutoff”Cutoff/Threshold for chunked uploads.
Any files larger than this will be uploaded in chunks of the configured chunksize.
The upper limit for this is 2147483647 bytes (about 2.000Gi). That is the maximum amount of bytes a single upload-operation will support. Setting this above the upper limit will cause uploads to fail.
Type: SizeSuffix · Default: 96Mi
upload_concurrency
Section titled “upload_concurrency”Concurrency for chunked uploads.
This is the upper limit for how many transfers for the same file are running concurrently. Setting this above to a value smaller than 1 will cause uploads to deadlock.
If you are uploading small numbers of large files over high-speed links and these uploads do not fully utilize your bandwidth, then increasing this may help to speed up the transfers.
Type: int · Default: 4
encoding
Section titled “encoding”The encoding for the backend.
See the encoding section in the overview for more info.
Type: Encoding · Default: Slash,Dot
description
Section titled “description”Description of the remote.
Type: string
Limitations
Section titled “Limitations”Symbolic links
Section titled “Symbolic links”HiDrive is able to store symbolic links (symlinks) by design, for example, when unpacked from a zip archive.
There exists no direct mechanism to manage native symlinks in remotes. As such this implementation has chosen to ignore any native symlinks present in the remote. rclone will not be able to access or show any symlinks stored in the hidrive-remote. This means symlinks cannot be individually removed, copied, or moved, except when removing, copying, or moving the parent folder.
This does not affect the .rclonelink-files
that rclone uses to encode and store symbolic links.
Sparse files
Section titled “Sparse files”It is possible to store sparse files in HiDrive.
Note that copying a sparse file will expand the holes into null-byte (0x00) regions that will then consume disk space. Likewise, when downloading a sparse file, the resulting file will have null-byte regions in the place of file holes.