How do you manage OneFS snapshots from the CLI?
It’s easy to use the isi snapshot snapshots commands.
We have worked through setting up Isilon’s OneFS Snapshots from the WebCLI in multiple Isilon Quick Tips. Let’s turn our focus now to setting up our snapshots from the CLI. Watch the video below and follow along while we use the CLI to create onetime snapshots and snapshot schedules.
Transcript – Creating Snapshots with Isilon’s OneFS from Command Line
Welcome back to another episode of Isilon Quick Tips. Today, we’re going to be talking about snapshots. We’ve covered snapshots in previous episodes, but everything we’ve done has always revolved around that web-cli.
Today, we’re going to go behind the scenes, and see what we can accomplish with snapshots, as far as creating and listing out different snapshots, all from the command line. Get ready to follow along by opening up your command prompt.
Once we’re logged in to the CLI, we can use your ISI-Snapshot snapshots list to list out all our snapshots. You can see your ID, name, and path here. What if we want to get some more details on this? We can use the ISI-Snapshot snapshots view, and we’re going to pull in that specific ID, so the ID I want to pull is number two, which corresponds to the nasa-snaps. When we run that command, what we can look at, or we can see that ID, but we can also see the path, so we know that it’s on the IFS NASA directory. We can see when it expires. We can also see the size and some other information, too. Let’s create a one-time snap using the command line.
To do that, what we’re going to do is, we’re going to use our ISI-Snapshot snapshots create command. What we’re going to do with that is, we’re going to pick a path. We’ve already got a snapshot schedule set up for the NASA directory, but what I want to do is, I want to set one up for the videos directory. I’m going to put the absolute path, and so that’s the ifs/videos. Then, we’ll also pass in our name. The name I’m going to use is the video-snaps.
That complete, let’s list out our snapshots and see if our one-time snap was taken. Remember, that’s ISI-Snapshot snapshots list, so we take out that S.
That was how we take a one-time snap. What happens when we want to set a schedule up for our snapshots? Before we set up that snapshot schedule, I want to reference the CLI guide. In the CLI guide, here, you can see a table with all these different percentage and letters. I’m going to reference these are we’re creating that snapshot schedule. These are going to be a way for us to be able to name how we want to show the time-date stamp on our snapshot schedules.
Our snapshot schedule we’re going to create is going to be for the ifs/videos directory, but we want to set a schedule instead of just a one-time snap. We’re going to use the ISI-Snapshot schedules create, going to pass in our name, so video-snaps, going to keep that as the name for this one. We’re going to do it ifs/videos, that’s our directory.
Now, we’re going to pass in video-%c, and that’s going to give us the year, month, day of the week, hour, minute, and second, for each time the snap is taken. The %c is what I was talking about, use the table that we had just looked at to be able to pass that in. Now, we’re going to select every day, every hour. I want a snap every day, of every hour. The last parameter we’re going to pass in is going to be the duration. That duration is going to be when we want it to expire.
I’m going to let these snaps be okay for a year. They’re going to roll off in a FIFO fashion every year. We can create that schedule, and we want to view it. To view it, we’re going to use the isi snapshot schedules list. You can see we have two schedules here. The video snap that we just created, and one we previously had for our Nasa Snapshots.
Now, let’s view the details. isi snapshot schedules view, and then the ID number, so 3. Now, we can see we have an ID number of 3. That’s our absolute path, and we have that snapshot schedule happening every day, of every hour, and the duration is for one year. We didn’t specify an alias. We can see when it’s going to run next. That’s how you view snapshots from the command line, how you create one-time snaps, and even set up snapshot schedules, all from the command line. Make sure that you subscribe, so that you never miss an episode of Isilon Quick Tips, or more videos are big data and Hadoop.