cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

CISCO SWITCHES FOR SMALL and MEDIUM BUSINESS

Introducing the next generation of Cisco Small and Medium Business Switches. Cisco is refreshing its SMB Switch portfolio. Click here  to learn more.


456
Views
4
Helpful
1
Replies
Highlighted
Beginner

?SGE2010P method of automated back up of running config

I have just inherited a clutch of  SGE2010P for connecting VOIP and POE devices.  

 

So far they have given me horrible flashbacks to cisco 1900 vt100 configuration screens.

 

I'm looking for some plausible automated way of saving the running configs using CISCO-CONFIG-COPY-MIB,  perl, tcl, or whatever else might work.

 

I will appreciate any insight anyone may have.

 

Thanks.

Everyone's tags (3)
1 REPLY 1

this should get you started.#

this should get you started.

#!/bin/bash

host=$1
string='YourSNMPStringHere'
mib=/usr/share/snmp/mibs/CISCOSBcopy.mib

case $2 in
    start | startup | startup_config )
    rlCopySourceFileType="3"  #3 for startup config, 2 for running config
    filename=$host\_$(date +%b.%d.%Y)_startup_config.txt
    ;;

    run | running | running_config )
    rlCopySourceFileType="2"  #3 for startup config, 2 for running config
    filename=$host\_$(date +%b.%d.%Y)_running_config.txt
    ;;

        * | "" | -h | --help | usage | --usage )
                echo "you must specify 2 parameters, host and config"
        echo ""
                echo "host would be the name of a switch that is to be backed up, sg300 or sg500"
        echo "config would be the name of the config to be backed up, running_config or startup_config"
                exit
        ;;
esac

rlCopyRowStatus="4"  #create and go
rlCopySourceLocation="1"  #local
rlCopySourceIpAddress="0.0.0.0"
rlCopySourceUnitNumber="1"  #unit number in stack
rlCopySourceFileName=""  #blank
rlCopyDestinationLocation="3"  #tftp
rlCopyDestinationIpAddress="192.168.1.254"  #tftp server ip
rlCopyDestinationUnitNumber="1"  #unit number in stack
rlCopyDestinationFileName=$filename

backup (){
snmpset -v2c -c $string -m +/usr/share/snmp/mibs/CISCOSBcopy.mib $host \
    rlCopyRowStatus.0 i $rlCopyRowStatus \
    rlCopySourceLocation.0 i $rlCopySourceLocation \
    rlCopySourceIpAddress.0 a $rlCopySourceIpAddress \
    rlCopySourceUnitNumber.0 i $rlCopySourceUnitNumber \
    rlCopySourceFileType.0 i $rlCopySourceFileType \
    rlCopyDestinationLocation.0 i $rlCopyDestinationLocation \
    rlCopyDestinationIpAddress.0 a $rlCopyDestinationIpAddress \
    rlCopyDestinationUnitNumber.0 i $rlCopyDestinationUnitNumber \
    rlCopyDestinationFileName.0 s $rlCopyDestinationFileName
}

backup