dah85.com

*not* just another blog ;)

Setting up rclone with hubic

- Posted in Quick Tip by with comments

In this post, we'll be setting up rclone with hubic, as requested by one of my readers :)

We will assume that you already have rclone installed, but just in case you don't, refer to the last post here with the details.

Okay, so if you followed the tutorial above we have rclone installed in ~/rclone-v1.39-linux-amd64

By the way, in case you didn't know, ~ is a shortcut for your home directory, so instead of having to do "cd /home/david" you can just do "cd ~"

Let's move along...

First, we'll run the rclone config:

rclone config

Then we'll set it up, just type or copy/paste the following one line at a time:

n
hubic
11
<enter>
<enter>
n

So, instead of having a nice link to click on we need to do something slightly different. It needs you to install rclone on a computer that has a web browser, so if you're running Windows click here to download rclone for Windows.

Since I'm going step by step, I'll include what to do with the rclone download in Windows :)

  1. Open the .zip file by double clicking on it, and drag the file "rsync.exe" to the desktop.
  2. Click your start menu (or press the Windows logo key on your keyboard) and type "cmd" - this should get you into the command prompt.
  3. Change into the Desktop folder by doing this:

    cd Desktop

  4. Now, we need to get a code to put in the rclone setup on the seedbox:

    rclone authorize "hubic"

  5. You need to sign in with your hubic login details, once you've done that, the command prompt will have some code for you to copy and paste into the terminal of your seedbox. (Note, if you're having problems copying from command prompt, right click and select "Mark" then highlight the code and right click again to save it in the clipboard, now you can paste it)

  6. The code should look like this: {"access_token":"VIhLVq7ChEidx6MickifbldhktyAlKpRocVcYkrnaDrwid1RKdSYMMMMm0X0qEOy","token_type":"Bearer","refresh_token":"EmT3zR0B7ZFt9SVtT51YNHjNDDrKu1PmMyBTiLfCcj2sWlHAtUR5bILEW1lUhL07","expiry":"2018-02-05T03:18:42.5584951+10:00"}

  7. Go ahead and paste that in the seedbox terminal where we were setting up rclone.

  8. When I tried it, it didn't work at first so I had to paste it into notepad and make it all into 1 line and then copy it and paste it again and it worked. Once you got to that stage, you can close the windows command prompt.

In the rclone setup your seedbox:

y

If you see the following, then it worked:

Current remotes:

Name                 Type
====                 ====
hubic                hubic

Now we can quit the rclone setup:

q

Let's see what files are on hubic:

rclone lsd hubic:

Be sure to keep the : at the end, oh, and change it from hubic to whatever you named it.

You should see a list of files on your hubic. If so, success!

Now, to put files onto your hubic, let's assume you want to copy a folder and it's files from /var/media to a folder on your hubic called media, let's do this:

rclone copy /var/media hubic:default/media

If you put it in the default folder it will appear in the hubic web site, if you don't put it in default then it will still be on your storage but you can't see it on the website.

If you want to see the speed while it's uploading, do this:

rclone -v --stats 1000ms copy /var/media hubic:default/media

That will print the speed every 1 second (1000ms) but it takes a few seconds for it to start the transfer and then it will show the speed.

And you've successfully set up rclone with hubic :)

As requested by one of my readers, here's how to set up rclone with Google Drive for use with a seedbox.

I'm using Ubuntu 16.04 and this seedbox script: https://github.com/arakasi72/rtinst

I assume that's already set up nicely, now we move on to rclone.

First, we update and install what we need (unzip):

sudo apt update ; sudo apt install -y unzip

Then, we'll download the rclone files into your home directory:

cd ~ 
wget --no-check-certificate https://downloads.rclone.org/rclone-v1.39-linux-amd64.zip

After that, we unzip it:

unzip rclone-v1.39-linux-amd64.zip

Then change into it's folder:

cd rclone-v1.39-linux-amd64

Now, we'll install it to /usr/bin/ so that we can call it from anywhere:

sudo cp rclone /usr/bin/

Now, it's time to set it up!

rclone config

It will ask a bunch of questions, here's how I answered them (just do it in the same order, only change the name of the "remote" from gdrivetest to whatever you wanna call it)

n
gdrivetest
10
<enter>
<enter>
<enter>
n

Here it will give you a link, go ahead and open that on your computer, sign into the google account you want to use and then it will give you a key for example

4/JoTB6qB8Bgrk-i66i9yOIBj1D1234mSM1HTDrDjGw1Y

Go ahead and paste that code (not mine, yours!) into the rclone installer and press

Let's continue:

n
y
q

So, right now we just created a remote called gdrive test.

To test it, now type:

rclone lsd gdrivetest:

Be sure to keep the : at the end, oh, and change it from gdrivetest to whatever you named it.

You should see a list of files on your Google Drive. If so, success!

Now, to put files onto your Google Drive, let's assume you want to copy a folder and it's files from /var/media to a folder on your Google Drive called media, let's do this:

rclone copy /var/media gdrivetest:media

And you've successfully set up rclone with Google Drive :)