Okay snake.
We don't need you
I don't mind Python as in the programming language but I don't particularly like snakes.
You can watch this video as an example where I had a encounter with a black mamba in Africa when that
snake bite you.
You've got about 30 minutes to live for 60 minutes and then you get
so fortunately nothing happened but it was a very close encounter.
In this video I'm going to show you how to backup IAW configurations.
I'm going to show you two methods to do that.
The first method is using cron which is very similar to cron on Linux.
It basically allows you to schedule things so we're going to schedule automated backups of Cisco routers
and switches you can backup the configurations you can do other things in a previous video which I blinked
here.
I showed you how to use TTL scripts to do things but you can use cron to schedule TTL scripts.
The second method is to use archiving in both these methods have been available in the Cisco IOW for
a while.
I don't need Mr. Python here because we are not going to be using python in other videos.
I have shown you how to use Python to backup configurations so have a look at this video.
If you're interested in doing that I'll also create some updated videos because my Python videos on
YouTube are quite old at this point but again cron has been available in the Cisco IOW for a while as
you can see here it's been available since 12.
The two on some versions of IOW so it's been available for a while archiving provide you with many features.
It's also been available in the Cisco IOW for a while.
So as you can see here twelve to twelve that three it's also available in Cisco XY okay as always because
this is YouTube.
I need to ask you please subscribe to my YouTube channel please like this video.
If you find it useful and please click on the bell to get notifications when I post a new video.
Okay so I've spoken enough now.
Let's get started.
I'm using a junior 3D topology here.
I've got three Cisco routers.
These are just traditional Cisco routers in my example and ride it to show version.
Notice we're using the IRS version 15 6 to T.
So this is just standard Cisco.
IOW it's not XY I've also got a bunch to server here.
The server is actually the tool box server available in genius 3 and what's nice about the stock contain
ingenious 3 is we have TFT p.
If I go to the TFT boot directory there are a bunch of files ready here but what I'll do is I'll remove
all the files in the directory so Alice now shows us that there are no directories in this TFT B boot
directory no files currently exist in this directory but what's nice about this docker container is
that it runs a TFT server.
Now if you've got a Windows P.C. you could use different TFT servers you could use solar winds which
is a free TV server and I've linked that below.
Or you could use TIF to be 32 as an example.
There are multiple or 64 if you prefer there are multiple t FTB server options available for free so
you don't have to pay for a TFT B server today.
Okay so this is a boon to host has a IP address of 10 or 1 3 to 2 that's the IP address that we're going
to backup conflicts to now on rather to.
That's the writer here in our topology.
You could do this on multiple routers but I'll just do this on right at 2.
I'm going to use the command Cron.
So K R O N.
In this example I need to specify a policy list and an occurrence.
So basically what are we gonna do.
And how often are we going to run the commands.
Okay so cron let's say policy list.
Give it a name so let's say backup config.
Whatever name you like.
So just give it some kind of name.
And then what we're gonna do is run a seal ly command.
And in this example I'm going to type show run pipe redirect TFT P and again you could use MCP or something
else if you want the Ubuntu to host has this IP address once again.
So 10 1 3 2 so paste that in.
And give it a name let's say R2 show run dot see f g.
So that's the file name where we're going to save the configuration.
Okay cron occurrence.
So give it a name let's say backup every minute whatever you want to use.
Notice here we have two options in.
How often are we going to run this so in one minute in my example or at a specific time.
So I'm going to say in 1 minute we can specify minute or hour minutes or days hours and minutes.
So in one minute recurring what I'm going to do is run the policy list of backup config so scrolling
up.
That's the policy that we created.
Backup config.
So that's the one that we're going to run.
Okay so end.
And that's all you need to do really.
So show cron schedule shows us that our backup will run in thirty eight seconds thirty five seconds
thirty four seconds.
Getting back on to the TFT server.
Notice we don't have a configuration on the TFT server because it's going to run in twenty three seconds
before that runs.
Let's do a debug to debug cron all so that we can see what's going on.
Show cron schedule once again 14 seconds to go.
No config on the TFT server.
Nine seconds seven seconds.
Sorry about this delay.
I'll speed this up if you like in future.
Now one of the things I want you to see is notice before it ran it was inactive.
But as soon as it ran it became active.
So it's active while it's running and you can see here this is what happened.
The command was called show run redirect config to the T FTB server so that command has run it'll run
again in 56 seconds or 16 seconds in this example.
Notice the config is there.
If I type more or 2 Config notice there is the running configuration of my router it's been backed up
to this FTB server that's actually just run again.
So the conflict has been backed up once again so I could remove this or in this example let's just move
it to or 2 v 1 config so Alice now shows us that we've got the old config here when this runs again
in 31 seconds we'll get to the new configuration on the TFT server.
Now one of the questions people often ask is OK how do I get a timestamp and I'll show you that using
the archive method.
Okay so it's just run Alice again.
Notice there's our configuration.
So once again more are to see if there's a running configuration backed up to the T FTB server.
Okay so that's the first method cron you can get this to do many types of things they've got some examples
on the Cisco Web site you can find a lot of examples of this online as well.
You can get it to run TCO or tickle scripts you can get it to do all kinds of things.
It's basically a scheduler just like you have in Unix or Linux.
Okay next one is archiving okay archiving allows you to do a lot more than just backup contacts you
can restore configurations you can have a history of configurations.
Very nice feature available on Cisco Iowa's global conflict mode archive
what options are we going to use.
We're going to use log config so we going to log our configuration and actually you can see here cron
has just run.
So what I'll do actually is turn off the debug.
So do on all basically disable debugging.
That's not part of the archive command.
So just that doesn't get confusing.
I'll do that again.
I typed archive and then I typed a log config pressed enter and now what I'm going to do here is enable
logging.
So logging in Abel I'm going to hide keys which basically suppresses output e.g. passwords when displaying
logged commands.
We don't particularly want our passwords displayed so hide keys.
Next step is exit and what we want to do here is specify a path noticed the options.
There are many options here we could use flash so right.
The configurations to the flash of the rider.
We consented to TFT P survey.
We can send it to a secure copy server but in our example I'm simply going to use TFT P so TFT P forward
slash forward slash IP address of the TFT server.
Is this a 10 1 3 2
and what I'm going to do here is specify a date so notice $ H hyphen or dash what I also want to do
is backup in the configuration whenever the configuration is saved.
So as soon as I save the configuration I want to write it to the archive.
You can also specified time period now typically you don't want to do it as I'm doing it yet.
One minute you might use a value like this which is once a week but in my example I'm just going to
specify one minute because I want it to backup continuously notes show archive.
This is the most recent configuration so it's actually backed it up and ready to the TFT P server show
clock.
Notice the date troll September the time eleven forty nine fifty eight.
So this got backed up at 32.
That is the most recent configuration and that's what I'm seeing here.
Now clear the screen.
Alice dash l notice we can see another configuration has been backed up so we now have two configurations
on the T FTB server and if I type show archive on the rota notice we can see most recent configuration
is there again so let's do that again soon as I type w r so write my configuration and then type show
archive notice and archive was made back on the ubuntu server.
There's our newest archive show archive right.
The configuration show archive.
This is the most recent one now back on the TV server.
Originally we had to.
Now we've got three and it's actually done another archive because I'm making it archive every minute
so copy run start save the configuration back on the TFT server.
Notice we've got a nother backup of configuration Okay so that was fairly simple.
I've shown you how to archive the Rogers configuration and pointed to a TFT path.
It's going to run every minute.
In my example now that's probably way too much but just for this demonstration that works.
It's also going to archive the configuration when I save the configuration.
Show archive notice we can have up to 10 displayed you on the right.
So what I'll do is I'll simply do a bunch more.
So do another one.
Notice we are at 9 as a number here.
Do another one show archive.
Notice 10 is the most recent notice we lost.
0 there.
Save that again.
Notice we are at eleven.
We lost one but those conflicts still exist on my TV service.
There's the original config knows we all the way to eleven.
So these are two great ways to automate the backup of rudder configurations.
Once again show run on use forward slasher to search for archive.
These are archive configuration and as always I'll put this below the video.
And here is the cron configuration now with cron one thing I forgot to show you is the act option so
I'll just paste that configuration in here.
Notice with cron you can get it to run at a certain time so notice at 11 p.m. Sunday reoccurring and
the policy that's going to run is this one.
So show run forward slash Cron.
I've got it running every minute probably want to remove that and then I've got it running every Sunday
evening.
The issue here is it's going to overwrite the config on the TFT server archiving makes us a lot easier.
Very simple configuration to archive your config to a T FTB server or FTB server or secure copy server
every week every minute whatever you decide to do.
Okay so hopefully you found this video useful.
If you have please would you like it please would you subscribe to my YouTube channel and please click
on the bell to receive notifications when I upload a new video.