[rancid] ignoring files in flash

heasley heas at shrubbery.net
Sat Jul 1 18:39:50 UTC 2017


Thu, Jun 29, 2017 at 01:03:07PM -0700, allonon:
> Hi, Unfortunately my lack of programming skils requires me to ask this
> question.
> 
> I updated our config to write an archived config copy to flash every
> night.  That has the side affect of having rancid email me for the
> changes.  I found the area in ios.pm to to drop files entirely,  addded the
> following "|archived\-config*" to the line (without the double quotes) but
> it's not ignoring the daily files.
> 
> Please help me ignore these files   Thanks

Index: CHANGES
===================================================================
--- CHANGES	(revision 3689)
+++ CHANGES	(working copy)
@@ -1,4 +1,7 @@
 3.99.99
+	ios.pm: filter config archive file names running-config-archive-*; no
+	reasonable file name suggestion found in docs.
+
 	aeos.pm: filter unsaved config changes notification
 
 	ios.pm: ignore size of throughput_monitor_params on XE - Emille Blanc
Index: lib/ios.pm.in
===================================================================
--- lib/ios.pm.in	(revision 3688)
+++ lib/ios.pm.in	(working copy)
@@ -951,7 +951,7 @@
 	# to:
 	#                                     vlan.dat
 	#                                            vlan.dat
-	if (/(dhcp_[^. ]*\.txt|vlan\.dat|sflog|snooping|smart-log\/agentlog|syslog)\s*$/) {
+	if (/(dhcp_[^. ]*\.txt|vlan\.dat|running-config-archive-\S+|sflog|snooping|smart-log\/agentlog|syslog)\s*$/) {
 	    if (/(\s*\d+)(\s+[-rwx]+\s+)(\d+)(\s+)(\w+ \d+\s+\d+ \d+:\d+:\d+ .\d+:\d+)/) {
 		my($fn, $a, $sz, $c, $dt, $rem) = ($1, $2, $3, $4, $5, $');
 		my($fnl, $szl, $dtl) = (length($fn), length($sz), length($dt));
@@ -1061,7 +1061,7 @@
 	# to:
 	#       -rw-                                   vlan.dat
 	#       -rw-                                           vlan.dat
-	if (/(dhcp_[^. ]*\.txt|vlan\.dat|sflog|snooping|syslog)\s*$/) {
+	if (/(dhcp_[^. ]*\.txt|vlan\.dat|running-config-archive-\S+|sflog|snooping|syslog)\s*$/) {
 	    if (/(\s*\d+)(\s+\S+\s+)(\d+)(\s+)(\w+ \d+\s+\d+ \d+:\d+:\d+ .\d+:\d+)/) {
 		my($fn, $a, $sz, $c, $dt, $rem) = ($1, $2, $3, $4, $5, $');
 		my($fnl, $szl, $dtl) = (length($fn), length($sz), length($dt));



More information about the Rancid-discuss mailing list