Kalo anda belum tau apa itu hubic bisa dilihat disini sekalian signup.

Instalasi rclone

rclone dibuat menggunakan bahasa Go, jadi Go harus di install terlebih dahulu
Debian/Ubuntu

apt-get install golang

Fedora/CentOS

yum install golang

Download rclone, sesuaikan dengan arsitektur komputer anda.
Linux 64 Bit

wget http://downloads.rclone.org/rclone-v1.25-linux-amd64.zip

Linux 32 Bit

http://downloads.rclone.org/rclone-v1.25-linux-386.zip

ekstrak file yang baru di download

unzip rclone-*.zip

pindah ke folder hasil ekstrak

cd rclone-v1.25-linux-amd64

ubah file permission dan pindah ke /usr/sbin/ agar rclone bisa dipanggil darimana saja

chmod +x rclone
cp rclone /usr/sbin/
chown root:root /usr/sbin/rclone

Konfigurasi rclone dengan Hubic

File konfigurasi rclone disimpan di ~/.rclone.conf contoh isi file konfigurasinya

[hubic]
type = hubic
client_id = 
client_secret = 
token = {"access_token":"YTXT2GcInL9UeW9S62D7c7jO25xTW8IJnmNQ0","token_type":"Bearer","refresh_token":"hqTayQCHYTQOKEKB7qKTB835nJ9wQMfXcX3s","expiry":"2015-11-19T18:45:06.106482286+07:00"}

untuk menambah hubic kedalam rclone cara paling gampang dan yang paling benar adalah dengan wizard rclone, jalankan

rclone config
2015/11/20 12:35:12 Failed to load config file /root/.rclone.conf - using defaults: open /root/.rclone.conf: no such file or directory
No remotes found - make a new one
n) New remote
q) Quit config
n/q> n
name> hubic
What type of source is it?
Choose a number from below
 1) amazon cloud drive
 2) drive
 3) dropbox
 4) google cloud storageh
 5) swift
 6) hubic
 7) local
 8) onedrive
 9) s3
type> 6
Hubic Client Id - leave blank normally.
client_id> 
Hubic Client Secret - leave blank normally.
client_secret> 
Remote config
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...

sampai ditahap ini, alamat 127.0.0.1:53682 harus diakses dari browser untuk validasi call backnya, karena server ini tidak memiliki GUI dan berada di antah berantah, maka kita akan memanfaatkan port tunneling.
di komputer anda (dianggap anda menggunakan Linux) jalankan

ssh root@IP.SERVER -L 53682:127.0.0.1:53682

buka di browser anda http://127.0.0.1:53682/auth
buka di browser
masukkan username/password hubic anda klik Accept
callback hubic rclone success

di terminal anda akan muncul kira-kira seperti dibawah ini

Got code
--------------------
[hubic]
client_id = 
client_secret = 
token = {"access_token":"lrccCMM1yuhJuwnV6KHHZdS2gSP6BowCmsbnYTncuIm2XLF","token_type":"Bearer","refresh_token":"2YA3dkkwdFAOInDSO79Mjn74qJTpWftJBvmtff","expiry":"2015-11-20T18:42:19.66405345+07:00"}
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> Y
Current remotes:
 
Name                 Type
====                 ====
hubic                hubic
 
e) Edit existing remote
n) New remote
d) Delete remote
q) Quit config
e/n/d/q> q

Upload Download Hubic

1. Upload
formatnya

rclone copy namafile hubic:default/ -v

keterangan :
namafile -> file yang akan di upload
hubic -> nama file konfigurasi, lihat di ~/.rclone.conf bagian [hubic]
default/ -> lokasi root folder di Hubic
-v -> verbose (tampilkan log di terminal)
contoh

$ rclone copy bukan.film.mkv hubic:default/ -v
2015/11/20 12:50:55 Hubic: Got swift credentials (expiry 2015-11-21 06:44:45 +0100 +0100 in 23h53m49.184974379s)
2015/11/20 12:50:55 Hubic Swift container default: Modify window is 1ns
2015/11/20 12:50:56 Hubic Swift container default: Building file list
2015/11/20 12:50:57 Hubic Swift container default: Waiting for checks to finish
2015/11/20 12:50:57 Hubic Swift container default: Waiting for transfers to finish
2015/11/20 12:51:55 
Transferred:    603053784 Bytes (9509.82 kByte/s)
Errors:                 0
Checks:                 0
Transferred:            0
Elapsed time:      1m1.9s
Transferring:
 *                                bukan.film.mkv: 60% done. avg: 10544.1, cur: 11008.5 kByte/s. ETA: 35s
 
2015/11/20 12:52:34 bukan.film.mkv: Copied (new)
 
Transferred:   1000000000 Bytes (9737.18 kByte/s)
Errors:                 0
Checks:                 0
Transferred:            1
Elapsed time:     1m40.2s
 
2015/11/20 12:52:34 Go routines at exit 9

2. Download
Untuk melihat file-file anda yang berada di hubic gunakan perintah

rclone ls hubic:default

contoh

$ rclone ls hubic:default
1000000000 1000mb.bin
104857600 100mb.test
  4376547 H61M-C-SI-0511.zip
1000000000 bukan.film.mkv
 
Transferred:            0 Bytes (   0.00 kByte/s)
Errors:                 0
Checks:                 0
Transferred:            0
Elapsed time:        2.2s

disini saya akan mendownload file 100mb.test

$ rclone copy hubic:default/100mb.test .
2015/11/20 12:56:25 Local file system at /root: Building file list
2015/11/20 12:56:25 Local file system at /root: Waiting for checks to finish
2015/11/20 12:56:25 Local file system at /root: Waiting for transfers to finish
 
Transferred:    104857600 Bytes (2244.13 kByte/s)
Errors:                 0
Checks:                 0
Transferred:            1
Elapsed time:       45.6s

kalau di upload hubic di belakang, di download hubic bagian depan (sumber data).

Leave a comment

Your email address will not be published. Required fields are marked *