Discussion:
[rancid] ignoring files in flash
allonon
2017-06-29 20:03:07 UTC
Permalink
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
heasley
2017-07-01 18:39:50 UTC
Permalink
Post by 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));
allonon
2017-07-08 04:45:32 UTC
Permalink
Thanks, I actually had to apply the change to this line to accomplish
what I wanted, but appreciate the pointer

# Drop these files entirely.

/\s+(private-multiple-fs|multiple-fs|LISP-MapCache-IPv\S+|nv_hdr)$/ &&
next;

one of these days I'll need to update the scripts to the latest version
Post by heasley
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 @@
# 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 @@
# -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));
Loading...