This guide shows how to upload, download and share files in a Google Cloud Storage bucket in your Ursa Major project, using the web console or the command line. To create a bucket first, see Creating an Ursa Major storage bucket.
Costs: Standard-class storage is Tier 2 and is recharged to a lab funding source under an MOU. Archive classes (such as Coldline) are Tier 1 under current terms, within limits. Downloading data out of Google Cloud, and reading data from archive classes, can carry charges. See KB005: Ursa Major service tiers and Ursa Major cloud storage.
Sensitive data: P3, P4 or regulated data needs a review before it is stored. See Security and Data.
Web console
Open the bucket
- Go to the Google Cloud console and select your project (for example
my-lab-project). - Open the navigation menu and select Cloud Storage, then Buckets.
- Click the bucket name (for example
my-lab-bucket). The Objects tab lists its files and folders.
Upload files
- On the Objects tab, click Upload, then choose Upload files or Upload folder. You can also drag files onto the page.
- Wait for the upload to finish. Progress shows at the bottom of the page.
- Check that the files appear in the object list.
For large uploads (many files or many gigabytes), the command line is more reliable.
Download files
- On the Objects tab, click the file name.
- Click Download. The file is saved to your computer.
Share access
Cloud Storage shares access by granting a role to a person or group, not by sending a link. To give someone access to a bucket, including collaborators outside the project or outside UCR, send a request to research-computing@ucr.edu with the bucket name, the person's email address and whether they need read-only or read and write access. Research Computing grants the smallest role that does the job, and removes it when it is no longer needed. Buckets and objects are not made public.
Command line (gcloud)
- Install the Google Cloud CLI, or use Cloud Shell in the console, which has it already.
-
Check the installation:
gcloud version -
Sign in and set your project:
gcloud auth login gcloud config set project my-lab-project -
List the buckets in the project, and the contents of one bucket:
gcloud storage ls gcloud storage ls gs://my-lab-bucket -
Upload a file, or a whole folder:
gcloud storage cp myfile.txt gs://my-lab-bucket/ gcloud storage cp --recursive my-folder gs://my-lab-bucket/ -
Download a file:
gcloud storage cp gs://my-lab-bucket/myfile.txt ~/Downloads/Replace
my-lab-project,my-lab-bucketand the email address with your own values.
Other ways to connect
- To mount a bucket as a folder on Linux, see Mounting Google Cloud Storage on Linux with rclone.
- Google's guide: Discover object storage with the gcloud tool.
- Questions: research-computing@ucr.edu.