2015-11-08 23:29:58 +08:00
|
|
|
---
|
|
|
|
title: "Hubic"
|
|
|
|
description: "Rclone docs for Hubic"
|
2016-03-17 01:39:44 +08:00
|
|
|
date: "2016-03-16"
|
2015-11-08 23:29:58 +08:00
|
|
|
---
|
|
|
|
|
|
|
|
<i class="fa fa-space-shuttle"></i> Hubic
|
|
|
|
-----------------------------------------
|
|
|
|
|
|
|
|
Paths are specified as `remote:path`
|
|
|
|
|
|
|
|
Paths are specified as `remote:container` (or `remote:` for the `lsd`
|
|
|
|
command.) You may put subdirectories in too, eg `remote:container/path/to/dir`.
|
|
|
|
|
|
|
|
The initial setup for Hubic involves getting a token from Hubic 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
|
2016-02-21 21:39:04 +08:00
|
|
|
s) Set configuration password
|
|
|
|
n/s> n
|
2015-11-08 23:29:58 +08:00
|
|
|
name> remote
|
2016-02-21 21:39:04 +08:00
|
|
|
Type of storage to configure.
|
|
|
|
Choose a number from below, or type in your own value
|
|
|
|
1 / Amazon Cloud Drive
|
|
|
|
\ "amazon cloud drive"
|
|
|
|
2 / Amazon S3 (also Dreamhost, Ceph)
|
|
|
|
\ "s3"
|
|
|
|
3 / Backblaze B2
|
|
|
|
\ "b2"
|
|
|
|
4 / Dropbox
|
|
|
|
\ "dropbox"
|
|
|
|
5 / Google Cloud Storage (this is not Google Drive)
|
|
|
|
\ "google cloud storage"
|
|
|
|
6 / Google Drive
|
|
|
|
\ "drive"
|
|
|
|
7 / Hubic
|
|
|
|
\ "hubic"
|
|
|
|
8 / Local Disk
|
|
|
|
\ "local"
|
|
|
|
9 / Microsoft OneDrive
|
|
|
|
\ "onedrive"
|
|
|
|
10 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
|
|
|
|
\ "swift"
|
|
|
|
11 / Yandex Disk
|
|
|
|
\ "yandex"
|
|
|
|
Storage> 7
|
|
|
|
Hubic Client Id - leave blank normally.
|
2015-11-08 23:29:58 +08:00
|
|
|
client_id>
|
2016-02-21 21:39:04 +08:00
|
|
|
Hubic Client Secret - leave blank normally.
|
2015-11-08 23:29:58 +08:00
|
|
|
client_secret>
|
|
|
|
Remote config
|
2016-02-21 21:39:04 +08: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
|
|
|
|
If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth
|
2015-11-08 23:29:58 +08:00
|
|
|
Log in and authorize rclone for access
|
|
|
|
Waiting for code...
|
|
|
|
Got code
|
|
|
|
--------------------
|
|
|
|
[remote]
|
|
|
|
client_id =
|
|
|
|
client_secret =
|
|
|
|
token = {"access_token":"XXXXXX"}
|
|
|
|
--------------------
|
|
|
|
y) Yes this is OK
|
|
|
|
e) Edit this remote
|
|
|
|
d) Delete this remote
|
|
|
|
y/e/d> y
|
|
|
|
```
|
|
|
|
|
2016-01-07 23:20:32 +08:00
|
|
|
See the [remote setup docs](/remote_setup/) for how to set it up on a
|
|
|
|
machine with no Internet browser available.
|
|
|
|
|
2015-11-08 23:29:58 +08:00
|
|
|
Note that rclone runs a webserver on your local machine to collect the
|
|
|
|
token as returned from Hubic. 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,
|
|
|
|
|
|
|
|
List containers in the top level of your Hubic
|
|
|
|
|
|
|
|
rclone lsd remote:
|
|
|
|
|
|
|
|
List all the files in your Hubic
|
|
|
|
|
|
|
|
rclone ls remote:
|
|
|
|
|
|
|
|
To copy a local directory to an Hubic directory called backup
|
|
|
|
|
|
|
|
rclone copy /home/source remote:backup
|
|
|
|
|
|
|
|
### Modified time ###
|
|
|
|
|
|
|
|
The modified time is stored as metadata on the object as
|
|
|
|
`X-Object-Meta-Mtime` as floating point since the epoch accurate to 1
|
|
|
|
ns.
|
|
|
|
|
|
|
|
This is a defacto standard (used in the official python-swiftclient
|
|
|
|
amongst others) for storing the modification time for an object.
|
|
|
|
|
|
|
|
Note that Hubic wraps the Swift backend, so most of the properties of
|
|
|
|
are the same.
|
|
|
|
|
|
|
|
### Limitations ###
|
|
|
|
|
2016-03-17 01:39:44 +08:00
|
|
|
This uses the normal OpenStack Swift mechanism to refresh the Swift
|
|
|
|
API credentials and ignores the expires field returned by the Hubic
|
|
|
|
API.
|
|
|
|
|
|
|
|
The Swift API doesn't return a correct MD5SUM for segmented files
|
|
|
|
(Dynamic or Static Large Objects) so rclone won't check or use the
|
|
|
|
MD5SUM for these.
|