Technology Mindfulness Portfolio

When I had gotten my first phone I was entering middle school, which for me was sixth grade. The main purpose as to why I had the phone was to call my parents or another adult in my life in case of…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Accessing GCP cloud storage bucket as local directory on your machine

This is a simplified guide on how to access the GCP buckets just like a local directory which make it easier when dealing with data inside. For that we would use gcsfuse which is a utility that allows you to mount Google Cloud Storage buckets as file systems on your local machine (Linux, Debian). Note: It’s not currently available out of the box for MacOS.

Visit the following in order to install the gcsfuse on your linux machine (Please note that its not yet available for MacOS)

To mount a cloud storage bucket using gcsfuse, use the following commands:

gcsfuse — implicit-dirs — key-file /home/user/test-key-file-2984a80c5a4a.json — file-mode 777 — dir-mode 777 gcp-bucket “$HOME/local-mounted-folder”

This command mounts the gcp-bucket bucket from Google Cloud Storage to the local directory $HOME/local-mounted-folder. Adjust the paths and bucket name as needed.

Note: The — key-file option specifies the path to a service account key file, which is used for authentication and authorisation to access the Google Cloud Storage bucket. Replace /home/user/test-key-file-2984a80c5a4a.json with the path to your own service account key file in case you intend to write this bucket.

gcsfuse — implicit-dirs — billing-project “my-gcp-project” public-gcp-bucket “$HOME/local-mounted-folder”

This command mounts the public-gcp-bucket bucket from Google Cloud Storage to the local directory $HOME/local-mounted-folder. Adjust the paths and bucket name as needed. Note that the billing-project flag specifies the billing project associated with the bucket.

To unmount a mounted bucket, use the following command:

fusermount -u “$HOME/local-mounted-folder”

This command unmounts the bucket previously mounted to the directory $HOME/local-mounted-folder. Adjust the path according to your specific mount location.

Add a comment

Related posts:

I Failed For Years to Make a Living Through My Writing

The story of how I failed at making a living from my writing for six years before I finally cracked it. Here's what I did wrong, and what I'm doing now.

Meeting Rooms for Startups in Bangalore

In a city teeming with innovation and ideas, Bangalore stands tall as the Silicon Valley of India. An incubator for groundbreaking startups, this bustling metropolis offers a smorgasbord of coworking…

7 books by modern writers you might have missed

I have prepared seven fascinating and exciting books by modern writers. I invite you to discover the greatest books you might have missed, but in vain. Famous writers often stick in our minds as the…