[rancid] Backing up Brocade devices with read-only user

Jethro R Binks jethro.binks at strath.ac.uk
Tue Jan 8 13:29:25 UTC 2013


On Tue, 8 Jan 2013, Tobias Brunner wrote:

> Hi (once again),

Hi (once again),

In my francid, I have the following lines in the ShowVersion function.  
Again it is hacked around so not sure how it compares to what you have, 
but you will see it resolves this problem for you:

    while (<INPUT>) {
        tr/\015//d;
        next if /^\s*$/;
        last if (/^$prompt/);

        next if (/^(The system |Crash time)/);
        next if (/^(System|(Active|Standby) Management|LP Slot \d+) uptime is/);

        # This line appears somewhere between Netiron 5.1 and 5.3
        next if (/^(Switch Fabric Module \d+ Up Time)/);

        # remove uptime on newer switches
        # but retain the stackid itself
        s/(STACKID \d+)\s+system uptime is.*$/$1/;

        # See comments at start for more about this flag:
        if ( $skip_corrupt_serial ) {
                next if (/^\s+Serial #/);
        }

        s/^\s*(HW|SW)/$1/;
        s/^\s*(Compiled on)/SW: $1/;
        s/^\s*(\(\d+ bytes\) from )/SW: $1/;

        #s/^(HW.*)/$1\n/;
        if (/^SL (\d+)/) {
            $slot = "Slot $1";
            s/^SL \d+/$slot/;
        }
        if (/MHz .* processor/) {
            $slot = "MGMT";
        }
        s/^(\s*\d+ )/$slot:$1/;
        s/^===*//;

        ProcessHistory("VERSION","","","!$_");
    }

Jethro.



> 
> After having the configuration backup running for this Brocade devices, every 
> rancid-run I get the following diff:
> 
>  -- configs/router1    (revision 340)
> @@ -5,11 +5,11 @@
>   !NI-X-HSF Switch Fabric Module 1 (Serial #: YYYYYY,  Part #: 60-1001588-14)
>   !FE 1: Type fe600,  Version 1
>   !FE 3: Type fe600,  Version 1
> - !Switch Fabric Module 1 Up Time is 3 days 4 hours 43 seconds 
> + !Switch Fabric Module 1 Up Time is 3 days 11 hours 39 seconds 
>   !NI-X-HSF Switch Fabric Module 2 (Serial #: YYYYYY,  Part #: 60-1001588-14)
>   !FE 1: Type fe600,  Version 1
>   !FE 3: Type fe600,  Version 1
> - !Switch Fabric Module 2 Up Time is 3 days 4 hours 43 seconds 
> + !Switch Fabric Module 2 Up Time is 3 days 11 hours 39 seconds 
> 
> How can I exclude these lines from the diff?
> 
> Cheers,
> Tobias
> 
> -- 
> Nine Internet Solutions AG, Albisriederstr. 243a, CH-8047 Zuerich
> Support +41 44 637 40 40 | Tel +41 44 637 40 00 | Direct +41 44 637 40 13
> Skype nine.ch_support
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
> 

.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .
Jethro R Binks, Network Manager,
Information Services Directorate, University Of Strathclyde, Glasgow, UK

The University of Strathclyde is a charitable body, registered in
Scotland, number SC015263.


More information about the Rancid-discuss mailing list