Posts

Showing posts from June, 2020

Google Cloud Storage Command-line Utility [GSUTIL]

Image
GSUTIL Command-line utility for Google Cloud Storage Create Bucket (Including Storage Class, Location) gsutil mb -c [storage class] -l [location] gs://bucket-name Remove Bucket  gsutil rm -r gs://bucket-name Parallel multi-threading copy  gsutil -m cp -r . gs://bucket-name Turn on versioning on bucket (get details of versioning enable or not)  gsutil versioning get gs://bucket-name Set versioning off gsutil versioning set off gs://bucket-name Enable the versioning gsutil versioning set on gs://bucket-name List all version of a file gsutil ls -a gs://bucket-name Long listing format generation and meta-generation gsutil ls -al gs://bucket-name Changes the storage class of a object in a bucket  gsutil rewrite -s NEARLINE gs://bucket-name/* Change the storage class of multiple objects (Multi-Threading Parallel)  gsutil -m rewrite -s NEARLINE gs://bucket-name/* Access Control List (ACL) on objects (Public access to the general public) gsutil acl ch -u AllUsers:R gs://bucket-name/filename A

How to transfer Google Cloud Storage One account data to Google Cloud another account?

Image
                                                          Image Source: infiflex.com Step 1: Go to the account where storage bucket are resides. Select the Select the Bucket, you want to transfer data and Click on SHOW INFO PANEL on the Top Right. Step 2: Under PERMISSIONS click on Add members. Now type the email id of the another account where you want to transfer all of your files in New Members Box. Select Role Storage > Storage Admin. Step 3: Now, Go to second account, Go to your storage bucket and select and repeat the last steps but this time email id will be the 1st account email id. All Set. Step 4: Finally Go to First account open the Google Cloud Shell and run the following command - gsutil -m cp -r gs://SOURCE-BUCKET-NAME /* gs://DESTINATION-BUCKET-NAME /

Setup and Configure AWS CLI on EC2 Instances

Image
For Linux Systems Prerequisites:  You must ensure that you have at least Python 2 version 2.6.5+ or Python 3 version 3.3+ installed. To verify your current version, run the command: python --version Installation: The recommendation for installing the AWS CLI is to use the bundled installer provided by AWS. The bundled installer includes all dependencies required for the installation.  Step 1. To begin the installation run the following command: sudo curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip" Step 2. Next, you must unzip the downloaded package from step 1: sudo unzip awscli-bundle.zip Step 3. Once the package in unzipped, you can run the installation: sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws Using the -b option allows all users to use the AWS CLI from any directory, meaning you will not need to specify the install directory in the user’s $PATH variable.  Step 4. Check the installed version /usr/local/b