Storj storage backup tutorial

One of my friend who introduce my Storj.io as the Backblaze B2 alternative to back up Server, Work’s laptop or Development environment.

Register an account

URL: https://ap1.storj.io/

It has 3 different regions, such as: Japan, United stated, Belgium

Set up a bucket with own passphrase

This step is very important !!

Once your passphrase is created, Storj will use the passphrase you provide to do encryption.

When you forgot the passphrase, the bucket will be shown as empty but not real empty due to Storj cannot decrypt your files. Therefore, you have to do force delete

https://forum.storj.io/t/deleting-a-bucket/14437/3

uplink rb --force sj://bucket-to-remove

Create a S3 compatible key

Once the bucket is created, let’s create a S3 compatible key

Demo tutorial

Please write down the S3 Gateway credentials

Create API Key for CLI ( Mac OSX)

Setup client cli uplink on Mac OSX

References: https://docs.storj.io/getting-started/quickstart-uplink-cli/uploading-your-first-object/set-up-uplink-cli

Install the CLI tool on your Mac

curl -L https://github.com/storj/storj/releases/latest/download/uplink_darwin_amd64.zip -o uplink_darwin_amd64.zip
unzip -o uplink_darwin_amd64.zip
chmod 755 uplink
sudo mv uplink /usr/local/bin/uplink

Setup your account for uplink

uplink setup

# Select satellite region
[1] us1.storj.io
[2] eu1.storj.io
[3] ap1.storj.io

# Paste in your API Key for the CLI

Try to list and upload a file to remote bucket

# List 
uplink ls sj://<bucket_name>/

# Upload 
uplink cp genact sj://ggrrkkdev/genact

Setup rclone with Storj

Reference: https://docs.storj.io/dcs/how-tos/sync-files-with-rclone/rclone-with-native-integration

# Setup 
rclone config

rclone config
Current remotes:

Name                 Type
====                 ====
b2                   b2
storj                tardigrade

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> n
name> my-awesome-storj

# Choose provider (No.34)
34 / Tardigrade Decentralized Cloud Storage
   \ "tardigrade"

How to grep SERIALIZED ACCESS KEY for step below

# On your client cli 
uplink share --readonly=false

# You will get something like this

Sharing access to satellite [email protected]:7777
=========== ACCESS RESTRICTIONS ==========================================================
Download  : Allowed
Upload    : Allowed
Lists     : Allowed
Deletes   : Allowed
NotBefore : No restriction
NotAfter  : No restriction
Paths     : WARNING! The entire project is shared!
=========== SERIALIZED ACCESS WITH THE ABOVE RESTRICTIONS TO SHARE WITH OTHERS ===========
Access    : 19jFW4AgTomXSpUnus5WJ4pnvxeVDxxxxxx <<<< This is your KEY for step below !!!!
# Choose an authentication method.

Enter a string value. Press Enter for the default ("existing").
Choose a number from below, or type in your own value
 1 / Use an existing access grant.
   \ "existing"
 2 / Create a new access grant from satellite address, API key, and passphrase.
   \ "new"
provider> Choose: 1
Enter a string value. Press Enter for the default
access_grant> 19jFW4AgTomXSpUnus5WJ4pnvxeVDxxxxxx <Paste your SERIALIZED ACCESS as the KEY>

# Done

Rclone list bucket / file

# List all bucket
rclone lsf storj:

# List file under bucket
rclone lsf storj:/ggrrkkdev

Rclone copy a file to remote bucket

rclone copy data.zip storj:/ggrrkkdev/data.zip

Rclone check storage usage

rclone ncdu storj:

Mount storj on your Mac or Linux

# Example
rclone mount remote:path/to/files /path/to/local/mount

mkdir /mnt/storj

# Read and write
rclone mount --vfs-cache-mode writes storj:ggrrkkdev /mnt/storj --daemon 

## Linux 
apt-get install s3fs-fuse rclone

Check mounted drive daemon and unmount it

# Check running rclone process
ps -ax | grep rclone
> 3777024 ? SSl 0:00 rclone mount --vfs-cache-mode writes storj:ggrrkkdev /mnt/storj --daemon

## Kill the process
kill -9 3777024

## Unmount 
umount storj

## Remove directory
rm -rf storj/

## If you got error below, pls do makesure the directory is unmounted
rmdir storj/
rmdir: failed to remove 'storj/': Device or resource busy

Reference: https://help.backblaze.com/hc/en-us/articles/1260804565710-How-to-use-rclone-with-Backblaze-B2-Cloud-Storage