Cisco

Automated backups

Do you need to ensure that you have an updated backup of your network devices? Backup tasks are easilly forgetful, so manually backups are not the best idea. As always, we should configure automated copy tasks in order to make sure we have the latest configuration available in case of failures. We never know how important is a saved configuration until we need it.

Cisco IOS provide a set of configurations that allows us to schedule these processes. We just need to enter in archive configuration mode:

core1(config)#archive
core1(config-archive)#?
Archive configuration commands:
  default       Set a command to its defaults
  exit          Exit from archive configuration mode
  log           Logging commands
  maximum       maximum number of backup copies
  no            Negate a command or set its defaults
  path          path for backups
  rollback      Rollback parameters
  time-period   Period of time in minutes to automatically archive the
                running-config

As we can see, we’re able to set parameters like maximum number of copies, the target path where will be stored the copies, time-period between executions, etc

Taking a look at the path options, we have several destinations, for this example I’ll choose tftp server:

core1(config-archive)#path ?
  ftp:    Write archive on ftp: file system
  http:   Write archive on http: file system
  https:  Write archive on https: file system
  rcp:    Write archive on rcp: file system
  scp:    Write archive on scp: file system
  tftp:   Write archive on tftp: file system
core1(config-archive)#path tftp://192.168.100.29/Core1/core1.cfg

Next step is define when we want these copies to be done. In addition to the scheduled task, maybe we would want a new backup each time we save the running config:

core1(config-archive)#write-memory
core1(config-archive)#time-period 86400

The above configuration instructs the router to send the saved configuration each 86400 seconds (1 day) to the ftfp server, or after a manually saved configuration.

 Finally, check the configuration is working:

core1#sh archive
The next archive file will be named tftp://192.168.100.29/Core1/core1.cfg-6
 Archive #  Name
   0
   1       tftp://192.168.100.29/Core1/core1.cfg-1
   2       tftp://192.168.100.29/Core1/core1.cfg-2
   3       tftp://192.168.100.29/Core1/core1.cfg-3
   4       tftp://192.168.100.29/Core1/core1.cfg-4
   5       tftp://192.168.100.29/Core1/core1.cfg-5 <- Most Recent
   6
   7
   8
   9
   10
   11
   12
   13
   14

Related Posts

No Comments

Leave a Reply