• 4 months ago

Category

😹
Fun
Transcript
00:00Hey everyone, welcome back.
00:03So now the demo time that how we are going to create bucket from our local machine using
00:09this GS utility, a Google Cloud SDK.
00:15So what I'm going to do, first of all, on a web console, I just want to navigate to
00:22storage.
00:25And we have already created two buckets.
00:28So the first one will be from web console, then we have a cloud shell.
00:33The next which we are going to create is the same command.
00:39We are going to use gsutil makebucket and earlier we did one mistake.
00:45We use this file protocol.
00:46Now we are going to use this GS protocol.
00:50And let's give the bucket name.
00:52So bucket name will be bk-.
00:55Now in this case, it will be a cloud SDK.
00:59And let me just press enter.
01:02So all those authentication and everything happens in a background.
01:05You do not need to worry about it.
01:07Only once you need to log in.
01:09Let me just refresh and you will be able to see we are having three buckets now.
01:18bk-cloud-sdk also got created.
01:21Let me go inside and you will be able to see there is no content inside it.
01:26We can upload file from here, we can upload folders from here, we can create a folder.
01:30But what we are going to do, we are going to upload something from our cloud SDK.
01:37So what are the files that are available here?
01:39I have a lot many files are available.
01:43So one of the files I'll take, let's see which one we will take.
01:48Let's say results.txt file, I want to upload it.
01:51I can just simply use gsutil cp for copying purpose.
01:58We have a results.txt and where we want to upload.
02:05So it will be inside the gs-bk-cloud-sdk All right.
02:17Let me press enter and this particular file will be copied to this particular bucket.
02:24Now let me just go to storage and how we can refresh it.
02:30Either I can refresh the full web page also.
02:38And you will be able to see exactly the same file results.txt is available.
02:43So till now, inside this gs-utility, we use two commands like mb for making bucket and
02:53there will be one more we use like a cp for copying the file.
02:58Now same file, if you want to, let's say, copy from your Google Cloud to your local
03:03machine, exactly the same thing also, you can always do it.
03:07So let me just make copy.
03:08But now instead of a source place will be a gs.
03:13So first of all, before that, let me show you that what are the buckets are available.
03:20Now how we can list all those buckets.
03:23So what we can do very simple command gsutil ls and it will list down all those buckets
03:29are available.
03:31So currently in a shell, I have one file.
03:34So let me just go and those files will try to download in our local machine.
03:39So shell has a cat2.jpg.
03:43So what we will do gsutil, same cp, but now our source place will be a Google Cloud storage
03:52location.
03:53So I'm going to select this one, oops.
03:59And the file name will be cat2.jpg.
04:03So it will be a cat2.jpg and where I want to put it.
04:10So let me put in cat2.jpg only in my local machine.
04:17Copy cat2.jpg.
04:20How I can verify it?
04:21So I can go to my file explorer, C drive user Ankit, it will be a C drive user Ankit.
04:32And let's just search for cat, cat, cat, cat, yes, cat2.jpg file.
04:38So this way, in a both ways, on a both direction, you can copy file either from your local machine
04:45from where you are going to execute your gsutil command to your cloud storage or from cloud
04:51storage to your local machine.
04:53Let's see what are the things as of now we can do with this.
04:59So if you want to know versions, you can use this one options.
05:04We have ls, ls we have used, cp we have used, we can use even cat also.
05:10That is for concatenation.
05:11We have config, we have help.
05:14So there are many more things and there are many more things are associated with different
05:20services also.
05:22So when we learn more and more things like a sign URL, so we have one dedicated section
05:27specifically on a storage and a database where we are going to learn in a much more
05:32detail.
05:33Although we have one rm command also to remove something.
05:37And if you want to remove some bucket, you can use this rb.
05:40This is just to give you an idea that everything you can do directly from your local machine
05:46also through this cloud SDK.
05:48So whenever your shell doesn't work, whenever your web console doesn't work, you can always
05:53come here and provisioning your resource, managing your resources.
05:58Alright, so that is all about the cloud SDK.
06:01See you in the next video.

Recommended