Cisco snmp and TFTP
For Devices with ONLY TFTP Support, see folloing link with a GTE an PUT Script
This works with most Cisco Devices
 Easy Script sample
 
Newer Cisco Devices supports also SCP, FTP ... protocol for backing up, and restore the config.  
Copying config from and to the router is possible to control with snmp commands. Here you find some script sample, for using with linux.
 
A TFTP Sample:
#!/bin/bash
#
# simple tftp copy from the Router to the TFTP Server 
# 
# Version 0.1
# date 11.10.2008
# (c) by packetlevel.ch
#
#################################################################################
#  
# Community   		COMM
# Cisco Device IP	DEVIP
# TFTP Server		TARGETIP
# Backupfilename	FILENAME
COMM=privat
DEVIP=192.168.1.1
TARGETIP=192.168.1.100
FILENAME=backupfile
snmpset -c $COMM -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.14.111 i 6
snmpset -c $COMM -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.2.111 i 1
snmpset -c $COMM -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.3.111 i 4
snmpset -c $COMM -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.4.111 i 1
snmpset -c $COMM -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.5.111 a $TARGETIP
snmpset -c $COMM -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.6.111 s $FILENAME
snmpset -c $COMM -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.14.111 i 1
A Sample with scp
#!/bin/bash
#
# simple scp copy from the Router to the ssh Server 
# 
# Version 0.1
# date 11.10.2008
# (c) by packetlevel.ch
#
#################################################################################
#  
# Community   		COMM
# Cisco Device IP	DEVIP
# SSH Server		TARGETIP
# Backupfilename	FILENAME
# Username		USERNAME
# Password		PASSWD
COMM=privat
DEVIP=192.168.1.1
TARGETIP=192.168.1.100
FILENAME=backupfile
USERNAME=mysshuser
PASSWD=mysecret
snmpset -c privat -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.14.111 i 6
snmpset -c privat -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.2.111 i 4
snmpset -c privat -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.3.111 i 4
snmpset -c privat -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.4.111 i 1
snmpset -c privat -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.7.111 s $USERNAME
snmpset -c privat -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.8.111 s $PASSWD
snmpset -c privat -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.5.111 a $TARGETIP
snmpset -c privat -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.6.111 s $FILENAME
snmpset -c privat -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.14.111 i 1
A Sample with ftp
#!/bin/bash
#
# simple ftp copy from the Router to the ssh Server 
# 
# Version 0.1
# date 11.10.2008
# (c) by packetlevel.ch
#
#################################################################################
#  
# Community   		COMM
# Cisco Device IP	DEVIP
# SSH Server		TARGETIP
# Backupfilename	FILENAME
# Username		USERNAME
# Password		PASSWD
COMM=privat
DEVIP=192.168.1.1
TARGETIP=192.168.1.100
FILENAME=backupfile
USERNAME=myftpuser
PASSWD=mysecret
snmpset -c privat -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.14.111 i 6
snmpset -c privat -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.2.111 i 2
snmpset -c privat -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.3.111 i 4
snmpset -c privat -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.4.111 i 1
snmpset -c privat -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.7.111 s $USERNAME
snmpset -c privat -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.8.111 s $PASSWD
snmpset -c privat -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.5.111 a $TARGETIP
snmpset -c privat -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.6.111 s $FILENAME
snmpset -c privat -v 1 $DEVIP 1.3.6.1.4.1.9.9.96.1.1.1.1.14.111 i 1
 Easy Script sample

CISCO-CONFIG-COPY-MIB.oid
Dokumentaion
CISCO-CONFIG-COPY-MIB.oid functions

ccConfigCopyProtocol
OID: 1.3.6.1.4.1.9.9.96.1.1.1.1.2
Type: INTEGER
Options:tftp(1)
ftp(2)
rcp(3)
scp(4)
sftp(5)
Description: Defines whicn protocol is used for the copy process. TFTP is default

ccCopySourceFileType
OID: 1.3.6.1.4.1.9.9.96.1.1.1.1.3
Type: INTEGER
Options: networkFile(1)
iosFile(2)
startupConfig(3)
runningConfig(4)
terminal(5)
Descripton: Defines the source. Either the Source or the DestinatioFileType have to be set to startupConfig or runningConfig. Furthermore the SourceFileType has to be different to the DestinationFileType.

ccCopyDestFileType
OID: 1.3.6.1.4.1.9.9.96.1.1.1.1.4
Type: INTEGER
Options: networkFile(1)
iosFile(2)
startupConfig(3)
runningConfig(4)
terminal(5)
Description: Defines the destination.Either the Source or the DestinatioFileType have to be set to startupConfig or runningConfig. Furthermore the SourceFileType has to be different to the DestinationFileType.

ccCopyServerAddress
OID: 1.3.6.1.4.1.9.9.96.1.1.1.1.5
Type: IP Address
Description: Sets the address of the server to which the file will be copied to. Values like 0.0.0.0 or FF.FF.FF.FF are not allowed for this OID.

ccCopyFileName
OID: 1.3.6.1.4.1.9.9.96.1.1.1.1.6
Type: STRING
Description: Sets the name of the destination or source file. This OID has to be set as far as the destination or sourceFileType are set to networkFile or iosFile.

ccCopyUserName
OID: 1.3.6.1.4.1.9.9.96.1.1.1.1.7
Type: STRING
Description: Sets a username for FTP, RCP, SFTP or SCP. This will overwrite the user name which might have been set over the rcmd remote-username  command if RCP is used as protocol.

ccCopyUserPassword
OID: 1.3.6.1.4.1.9.9.96.1.1.1.1.8
Type: STRING
Description: Sets the password for FTP, RCP, SFTP or SCP

ccCopyNotificationOnCompletion
OID: 1.3.6.1.4.1.9.9.96.1.1.1.1.9
Type: INTEGER
Description: Defines if a notification has to be sent after the process has ended.

ccCopyState
OID: 1.3.6.1.4.1.9.9.96.1.1.1.1.10
Type: INTEGER
Options: waiting(1)
running(2)
successful(3)
failed(4)
Description: Shows the copy process’ status. This value will be set after the COPYEntryRowStatus has been set to active.

ccCopyTimeStarted
OID: 1.3.6.1.4.1.9.9.96.1.1.1.1.11
Type: TimeStamp
Description: Shows the last start time of the process or zero if the process never changed the status to running.

ccCopyTimeCompleted
OID: 1.3.6.1.4.1.9.9.96.1.1.1.1.12
Type: TimeStamp
Description: Shows the last time after the process changed from running to successful or failed.

ccCopyFailCause
OID: 1.3.6.1.4.1.9.9.96.1.1.1.1.13
Type: INTEGER
Options: unknown(1)
badFileName(2)
timeout(3)
noMem(4)
noConfig(5)
unsupportedProtocol(6)
someConfigApplyFailed(7)
Description: Shows why the process failed

ccCopyEntryRowStatus
OID: 1.3.6.1.4.1.9.9.96.1.1.1.1.14
Type: INTEGER
Options: active(1)
notInService(2)
createAndGo(4)
createAndWait(5)
destroy(6)
Description: Shows the process status


SNMP Links
 Cisco SNMP Doku

(c) 2008 by packetlevel.ch / last update: 11.10.2008