Difference between revisions of "Automatic Config Archiving"

From Baranoski.ca
Jump to navigation Jump to search
(Created page with "A Cisco router can automatically copy its config to a TFTP server when doing a '''write memory''' or on a predetermined interval. It automatically keeps the file names of up ...")
 
Line 1: Line 1:
A Cisco router can automatically copy its config to a TFTP server when doing a '''write memory''' or on a predetermined interval.  It automatically keeps the file names of up to 15 revisions.  This is very handy when combined with [[Configure Replace]].
+
A Cisco router can automatically copy its config to a TFTP server when doing a '''write memory''' or on a predetermined interval.  It is very handy when combined with [[Configure Replace]].
  
 
<PRE>
 
<PRE>
Line 11: Line 11:
 
$h is automatically replaced with the hostname, and $t with the timestamp.
 
$h is automatically replaced with the hostname, and $t with the timestamp.
  
 +
It automatically keeps the file names of up to 15 revisions. 
  
 
====Example====
 
====Example====
Line 28: Line 29:
 
   9        tftp://10.10.10.5/ROUTER-autoarchive-Jun--9-15:08:47.435-EDT-17
 
   9        tftp://10.10.10.5/ROUTER-autoarchive-Jun--9-15:08:47.435-EDT-17
 
   10      tftp://10.10.10.5/ROUTER-autoarchive-Jun-16-22:06:53.605-EDT-18 <- Most Recent
 
   10      tftp://10.10.10.5/ROUTER-autoarchive-Jun-16-22:06:53.605-EDT-18 <- Most Recent
 +
</PRE>
 +
 +
 +
==Comparing Revisions==
 +
 +
The device can also do a diff (compare) of two files.
 +
 +
<PRE>
 +
show archive config differences <file1> <file2>
 +
</PRE>
 +
 +
 +
====Example====
 +
<PRE style="color:white;background-color:black;font-weight:bold;font-size:1.2em;">
 +
ROUTER#$show archive config differences tftp://10.10.10.5/ROUTER-autoarchive-Jun--9-15:08:47.435-EDT-17 system:running-config
 +
Loading ROUTER-autoarchive-Jun--9-15:08:47.435-EDT-17 from 10.10.10.5 (via FastEthernet1): !
 +
[OK - 14346 bytes]
 +
 +
Contextual Config Diffs:
 +
+ip dhcp pool BLACKBERRY
 +
  +host 10.10.10.60 255.255.255.0
 +
  +client-identifier 0180.6007.5b21.8c
 +
  +client-name blackberry
 +
-ip dhcp pool BLACKBERRY
 +
  -host 10.10.10.60 255.255.255.0
 +
  -client-identifier 0180.6007.023c.2f
 +
  -client-name blackberry
 
</PRE>
 
</PRE>

Revision as of 13:07, 17 June 2013

A Cisco router can automatically copy its config to a TFTP server when doing a write memory or on a predetermined interval. It is very handy when combined with Configure Replace.

archive
 log config
  hidekeys
 path tftp://10.10.10.5/$h-autoarchive-$t
 write-memory

$h is automatically replaced with the hostname, and $t with the timestamp.

It automatically keeps the file names of up to 15 revisions.

Example

ROUTER#show archive
The maximum archive configurations allowed is 14.
The next archive file will be named tftp://10.10.10.5/ROUTER-autoarchive-Jun-17-13:53:36.731-EDT-19
 Archive #  Name
   1        tftp://10.10.10.5/ROUTER-autoarchive-May-13-22:54:50.924-EDT-9
   2        tftp://10.10.10.5/ROUTER-autoarchive-May-14-00:08:13.761-EDT-10
   3        tftp://10.10.10.5/ROUTER-autoarchive-May-21-09:11:36.401-EDT-11
   4        tftp://10.10.10.5/ROUTER-autoarchive-May-27-09:31:10.138-EDT-12
   5        tftp://10.10.10.5/ROUTER-autoarchive-May-29-10:11:35.187-EDT-13
   6        tftp://10.10.10.5/ROUTER-autoarchive-Jun--6-22:59:05.218-EDT-14
   7        tftp://10.10.10.5/ROUTER-autoarchive-Jun--7-22:25:48.223-EDT-15
   8        tftp://10.10.10.5/ROUTER-autoarchive-Jun--7-22:40:00.973-EDT-16
   9        tftp://10.10.10.5/ROUTER-autoarchive-Jun--9-15:08:47.435-EDT-17
   10       tftp://10.10.10.5/ROUTER-autoarchive-Jun-16-22:06:53.605-EDT-18 <- Most Recent


Comparing Revisions

The device can also do a diff (compare) of two files.

show archive config differences <file1> <file2>


Example

ROUTER#$show archive config differences tftp://10.10.10.5/ROUTER-autoarchive-Jun--9-15:08:47.435-EDT-17 system:running-config
Loading ROUTER-autoarchive-Jun--9-15:08:47.435-EDT-17 from 10.10.10.5 (via FastEthernet1): !
[OK - 14346 bytes]

Contextual Config Diffs:
+ip dhcp pool BLACKBERRY
   +host 10.10.10.60 255.255.255.0
   +client-identifier 0180.6007.5b21.8c
   +client-name blackberry
-ip dhcp pool BLACKBERRY
   -host 10.10.10.60 255.255.255.0
   -client-identifier 0180.6007.023c.2f
   -client-name blackberry