{"id":4402,"date":"2021-08-24T16:23:39","date_gmt":"2021-08-24T08:23:39","guid":{"rendered":"https:\/\/www.ookangzheng.com\/?p=4402"},"modified":"2021-08-24T17:28:57","modified_gmt":"2021-08-24T09:28:57","slug":"storj-storage-backup-tutorial","status":"publish","type":"post","link":"https:\/\/www.ookangzheng.com\/storj-storage-backup-tutorial\/","title":{"rendered":"Storj storage backup tutorial"},"content":{"rendered":"\n

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

Register an account<\/h2>\n\n\n\n

URL: https:\/\/ap1.storj.io\/<\/p>\n\n\n\n

It has 3 different regions, such as: Japan, United stated, Belgium<\/p>\n\n\n\n

Set up a bucket with own passphrase<\/h3>\n\n\n\n

This step is very important !! <\/em><\/strong><\/p>\n\n\n\n

Once your passphrase is created, Storj will use the passphrase you provide to do encryption.<\/strong><\/p>\n\n\n\n

\"\"<\/a><\/figure>\n\n\n\n

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<\/p>\n\n\n\n

https:\/\/forum.storj.io\/t\/deleting-a-bucket\/14437\/3<\/a><\/p>\n\n\n\n

uplink rb --force sj:\/\/bucket-to-remove<\/code><\/pre>\n\n\n\n

Create a S3 compatible key <\/h2>\n\n\n\n

Once the bucket is created, let’s create a S3 compatible key<\/p>\n\n\n\n

\"\"<\/a>
Demo tutorial<\/figcaption><\/figure>\n\n\n\n

Please write down the S3 Gateway credentials<\/p>\n\n\n\n

\"\"<\/a><\/figure>\n\n\n\n

Create API Key for CLI ( Mac OSX)<\/h3>\n\n\n\n
\"\"<\/a><\/figure>\n\n\n\n

Setup client cli uplink<\/code> on Mac OSX<\/h3>\n\n\n\n

References: https:\/\/docs.storj.io\/getting-started\/quickstart-uplink-cli\/uploading-your-first-object\/set-up-uplink-cli<\/a><\/p>\n\n\n\n

Install the CLI tool on your Mac<\/p>\n\n\n\n

curl -L https:\/\/github.com\/storj\/storj\/releases\/latest\/download\/uplink_darwin_amd64.zip -o uplink_darwin_amd64.zip\nunzip -o uplink_darwin_amd64.zip\nchmod 755 uplink\nsudo mv uplink \/usr\/local\/bin\/uplink<\/code><\/pre>\n\n\n\n

Setup your account for uplink<\/code> <\/p>\n\n\n\n

uplink setup\n\n# Select satellite region\n[1] us1.storj.io\n[2] eu1.storj.io\n[3] ap1.storj.io\n\n# Paste in your API Key for the CLI<\/code><\/pre>\n\n\n\n

Try to list and upload a file to remote bucket<\/p>\n\n\n\n

\"\"<\/a><\/figure>\n\n\n\n
# List \nuplink ls sj:\/\/<bucket_name>\/\n\n# Upload \nuplink cp genact sj:\/\/ggrrkkdev\/genact<\/code><\/pre>\n\n\n\n

<\/p>\n\n\n\n

Setup rclone with Storj<\/h3>\n\n\n\n

Reference: https:\/\/docs.storj.io\/dcs\/how-tos\/sync-files-with-rclone\/rclone-with-native-integration<\/p>\n\n\n\n

# Setup \nrclone config\n\nrclone config\nCurrent remotes:\n\nName                 Type\n====                 ====\nb2                   b2\nstorj                tardigrade\n\ne) Edit existing remote\nn) New remote\nd) Delete remote\nr) Rename remote\nc) Copy remote\ns) Set configuration password\nq) Quit config\ne\/n\/d\/r\/c\/s\/q> n\nname> my-awesome-storj\n\n# Choose provider (No.34)\n34 \/ Tardigrade Decentralized Cloud Storage\n   \\ \"tardigrade\"<\/code><\/pre>\n\n\n\n

How to grep SERIALIZED ACCESS KEY for step below<\/h3>\n\n\n\n
# On your client cli \nuplink share --readonly=false\n\n# You will get something like this\n\nSharing access to satellite 121RTSDpyNZVcxxxxxxxzoA6@ap1.storj.io:7777\n=========== ACCESS RESTRICTIONS ==========================================================\nDownload  : Allowed\nUpload    : Allowed\nLists     : Allowed\nDeletes   : Allowed\nNotBefore : No restriction\nNotAfter  : No restriction\nPaths     : WARNING! The entire project is shared!\n=========== SERIALIZED ACCESS WITH THE ABOVE RESTRICTIONS TO SHARE WITH OTHERS ===========\nAccess    : 19jFW4AgTomXSpUnus5WJ4pnvxeVDxxxxxx <<<< This is your KEY for step below !!!!\n<\/code><\/pre>\n\n\n\n
# Choose an authentication method.\n\nEnter a string value. Press Enter for the default (\"existing\").\nChoose a number from below, or type in your own value\n 1 \/ Use an existing access grant.\n   \\ \"existing\"\n 2 \/ Create a new access grant from satellite address, API key, and passphrase.\n   \\ \"new\"\nprovider> Choose: 1\nEnter a string value. Press Enter for the default\naccess_grant> 19jFW4AgTomXSpUnus5WJ4pnvxeVDxxxxxx <Paste your SERIALIZED ACCESS as the KEY>\n\n# Done<\/code><\/pre>\n\n\n\n

Rclone list bucket \/ file<\/h3>\n\n\n\n
# List all bucket\nrclone lsf storj:\n\n# List file under bucket\nrclone lsf storj:\/ggrrkkdev<\/code><\/pre>\n\n\n\n

Rclone copy a file to remote bucket<\/h3>\n\n\n\n
rclone copy data.zip storj:\/ggrrkkdev\/data.zip<\/code><\/pre>\n\n\n\n

Rclone check storage usage<\/h3>\n\n\n\n
rclone ncdu storj:<\/code><\/pre>\n\n\n\n

Mount storj on your Mac or Linux<\/h2>\n\n\n\n
# Example\nrclone mount remote:path\/to\/files \/path\/to\/local\/mount\n\nmkdir \/mnt\/storj\n\n# Read and write\nrclone mount --vfs-cache-mode writes storj:ggrrkkdev \/mnt\/storj --daemon \n\n## Linux \napt-get install s3fs-fuse rclone<\/code><\/pre>\n\n\n\n

Check mounted drive daemon and unmount it<\/h3>\n\n\n\n
# Check running rclone process\nps -ax | grep rclone\n> 3777024 ? SSl 0:00 rclone mount --vfs-cache-mode writes storj:ggrrkkdev \/mnt\/storj --daemon\n\n## Kill the process\nkill -9 3777024\n\n## Unmount \numount storj\n\n## Remove directory\nrm -rf storj\/\n\n## If you got error below, pls do makesure the directory is unmounted\nrmdir storj\/\nrmdir: failed to remove 'storj\/': Device or resource busy<\/code><\/pre>\n\n\n\n

Reference: https:\/\/help.backblaze.com\/hc\/en-us\/articles\/1260804565710-How-to-use-rclone-with-Backblaze-B2-Cloud-Storage<\/p>\n","protected":false},"excerpt":{"rendered":"

One of my friend who introduce my Storj.io as the Backblaze B2 alternative to back up Server, Work’s laptop or…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37,39,32],"tags":[],"class_list":["post-4402","post","type-post","status-publish","format-standard","hentry","category-linux","category-mac","category-technology"],"_links":{"self":[{"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/posts\/4402","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/comments?post=4402"}],"version-history":[{"count":3,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/posts\/4402\/revisions"}],"predecessor-version":[{"id":4413,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/posts\/4402\/revisions\/4413"}],"wp:attachment":[{"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/media?parent=4402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/categories?post=4402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ookangzheng.com\/wp-json\/wp\/v2\/tags?post=4402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}