How to copy configuration files to and from the cisco ios routers that use SNMP

Hello,
I went on the page : https://supportforums.cisco.com/docs/DOC-1860
You explain how to get a config file and send it to a tftp server or oppositely.
I face this problem:
id090365:~> snmpset -v2c -c communitystring hostipaddress .1.3.6.1.4.1.9.9.96.1.1.1.1.2.98 i 1
Error in packet.
Reason: noCreation (That table does not support row creation or that object can not ever be created)
Failed object: SNMPv2-SMI::enterprises.9.9.96.1.1.1.1.2.98
Do you have any idea?
Thanks,
Olivier

I hadn't seen any snmp guides using snmpv3 and scp as transport protocol. For those looking to implement, here is what worked for me.
As with the other snmp config copy guides you will need to download the respective MIBS and load them in the snmp.conf file.
This post will specifically cover the snmpset commands for a v3 setup.
SNMP Environment:
Name        : net-snmp
Version     : 5.7.2
Release     : 17.fc20
snmp conf file in ~/.snmp/snmp.conf
   contains
defSecurityName XXX <- replace with v3 username
defContext ""
defAuthType SHA
defPrivType AES
defSecurityLevel authPriv
defAuthPassphrase ***** <-replace with authentication pass
defPrivPassphrase *****  <-replace with encryption pass
defVersion 3
showMibErrors no
mibs ALL
I would verify basic snmpv3 functionality with a snmpwalk of something simple like sysUpTime. When that's good proceed to the CONFIG-COPY snmp commands.
This is my bash script that does the entire copy asking only for a single argument of IP/Hostname of the device being backed up. The 2>/dev/null shown in the script or at the cli below redirects STDERR to null to avoid the MIB modules parsing errors.
#!/usr/bin/bash
DEVICE=$1
RANNUM=42
USER=******
PASS=******
SERVER=X.X.X.X
DATE=$(date +"%m_%d_%y")
snmpset $DEVICE ccCopyProtocol.$RANNUM i 4 ccCopySourceFileType.$RANNUM i 4 ccCopyDestFileType.$RANNUM i 1 ccCopyServerAddress.$RANNUM a "$SERVER" ccCopyFileName.$RANNUM s "$DEVICE.$DATE" ccCopyUserName.$RANNUM s $USER ccCopyUserPassword.$RANNUM s $PASS ccCopyEntryRowStatus.$RANNUM i 4 2>/dev/null
Once run you can check the status of the copy with the following command.
[root@localhost hlsb]# snmpwalk sbs-tech-switch ciscoConfigCopyMIB 2>/dev/null
CISCO-CONFIG-COPY-MIB::ccCopyProtocol.42 = INTEGER: scp(4)
CISCO-CONFIG-COPY-MIB::ccCopySourceFileType.42 = INTEGER: runningConfig(4)
CISCO-CONFIG-COPY-MIB::ccCopyDestFileType.42 = INTEGER: networkFile(1)
CISCO-CONFIG-COPY-MIB::ccCopyServerAddress.42 = IpAddress: 10.10.10.193
CISCO-CONFIG-COPY-MIB::ccCopyFileName.42 = STRING: sbs-tech-switch.07_09_14
CISCO-CONFIG-COPY-MIB::ccCopyUserName.42 = STRING: XXXX
CISCO-CONFIG-COPY-MIB::ccCopyUserPassword.42 = STRING: XXXX
CISCO-CONFIG-COPY-MIB::ccCopyNotificationOnCompletion.42 = INTEGER: false(2)
CISCO-CONFIG-COPY-MIB::ccCopyState.42 = INTEGER: successful(3)
CISCO-CONFIG-COPY-MIB::ccCopyTimeStarted.42 = Timeticks: (52270199) 6 days, 1:11:41.99
CISCO-CONFIG-COPY-MIB::ccCopyTimeCompleted.42 = Timeticks: (52270339) 6 days, 1:11:43.39
CISCO-CONFIG-COPY-MIB::ccCopyEntryRowStatus.42 = INTEGER: active(1)
CISCO-CONFIG-COPY-MIB::ccCopyServerAddressType.42 = INTEGER: ipv4(1)
CISCO-CONFIG-COPY-MIB::ccCopyServerAddressRev1.42 = STRING: "10.10.10.193"
After the successful copy completes the entry will exist for five minutes allowing for no further requests to be made with that particular random number. To send another request prior to the five minute clearing of the table send a "destroy" snmpset to clear the entry.
[root@localhost hlse]# snmpset sbs-tech-switch CISCO-CONFIG-COPY-MIB::ccCopyEntryRowStatus.42 i 6 2>/dev/null
CISCO-CONFIG-COPY-MIB::ccCopyEntryRowStatus.42 = INTEGER: destroy(6)
Hope this will save some time for those looking to implement a more secure snmp config copy setup.
V/R
Cody Hartley

Similar Messages

  • New user...how do you drag or move or copy a file or folder from the desktop to an external drive?  I have tried dragging and copy/pasting.

    new user...how do you drag or move or copy a file or folder from the desktop to an external drive?  I have tried dragging and copy/pasting.

    My guess the problem you are running into is the drive is formatted for a PC as NTFS. OS X can read files from NTFS however it cannot write to it. Check the formatting on the drive, if it's NTFS then it should be reformatted to Mac OS Extended (Journaled), you can use Disk Utility to do this.
    If you still have a PC and want to share the EHD with the PC and Mac please read MacWorld's Share an external drive between a Mac and a PC article.

  • How to transfer files to and from the BB PlayBook

    Overview
    The following sections outline different methods of transfering files to and from the BlackBerry® PlayBook™.
    Wi-Fi® Sharing
    Complete the following steps to share files over a Wi-Fi connection:
    From the BlackBerry PlayBook home screen, select the settings icon.
    Select Storage and Sharing.
    Toggle Wi-Fi Sharing to ON.
    Tap Properties to verify network identification information. (PlayBook name, password etc)
    From a Windows or Mac based computer on the same network as the BlackBerry PlayBook, navigate to the IP address of the PlayBook which can be found under Settings > About > Network.
    On a Windows computer, open the Run dialog box and type \\127.1.1.1 (where 127.1.1.1 should be replaced with the actual IP address of the BlackBerry PlayBook)
    On a Mac computer, select Go -> Connect to Server... and type smb://127.1.1.1 (where 127.1.1.1 should be replaced with the actual IP address of the BlackBerry PlayBook)
    Users will then connect to the media folder which contains several subfolders such as documents, music, photos, videos etc.  Users can then move files between the computer and these folders.
    File Sharing with a Mac via USB connection
    To share files between a Mac and the BlackBerry PlayBook, BlackBerry® Device Manager will need to be installed. Complete the following steps to install BlackBerry Device Manager:
    Connect the BlackBerry PlayBook to the Mac.
    On the desktop or within Finder, double click BlackBerry PlayBook CD.
    Double click the BlackBerry Device Manager Installer to start the installation process.
    After reviewing the Read Me and License Agreement click Continue Installation.
    Reboot the computer when prompted.
    After the reboot is complete and the PlayBook is started, a message may be presented stating that a new network interface has been detected.  If this is the case, click on Network Preferences and click Apply.
    You may receive the error message  "You can't install the 'Network' preferences pane because it is already installed". *** If you receive this message,  See the additional notes for further steps, otherwise continue to step 8.
    After the PlayBook has been setup in Network Preferences, the PlayBook share will appear on the desktop whenever the PlayBook is connected to the computer.
    Click the Playbook icon on the desktop to display the PlayBook share.  Users can then move files between the computer and the PlayBook.
    File Sharing with a Windows® PC via USB connection
    To share files between a Windows based PC and the BlackBerry PlayBook, BlackBerry Device Manager will need to be installed. Complete the following steps to install BlackBerry Device Manager:
    Connect the BlackBerry PlayBook to the computer via USB cable.
    If BlackBerry Device Manager is not yet installed, the PlayBook will display a screen entitled Installing Drivers.
    On the computer, double click the BlackBerry PlayBook CD drive icon.
     Open the Drivers folder.
    Double click Setup.exe
    After selecting the appropriate region and accepting the License Agreement select Install.
    Select Finish and then OK to the prompt confirming that the PlayBook will need to be disconnected and then reconnected prior to use.
    Once reconnected to the computer, the BlackBerry PlayBook will be mounted as a Network Drive labelled PlayBook [PIN: 500AAAAA].  Double click the network drive icon to access the PlayBook folders.  Users can then move files between the computer and the PlayBook.
    Environment
    BlackBerry® PlayBook™
    Additional Information
    If you receive the error message  "You can't install the 'Network' preferences pane because it is already installed" while attempting to install the Network Device, complete the following steps:
    1. Click Ok and Navigate to System Preferences > Network
    2. Click Ok to accept the network changes. If you do not see the acceptance prompt, continue to the next step.
    3. Click the "+" under the listed device.
    4. Click Create on the RIM Network device interface screen
    Additional Notes:
    File and Folder creation is only available on the playbook within the sub directories of the file structure.  No folders can be created on the root folder of the drive.  This is by design.
    The main folders of the playbook are not meant to be modified renamed deleted or changed.  This is by design.
    While any file type can physically moved to the playbook the files capable of being opened by the playbook are still limited to KB26606, as well as KB26518.
    PLEASE DON'T FORGET TO GIVE KUDOS BY CLICKING THE STAR BELOW. THANKS

    After you connect your tablet via wifi in the network, you can also share files doing this:
    I personally have windows 7 in my laptops, and when I need to transfer files using my laptop, I open network and sharing center, then I click on see full map and finally I click on the icon  playbook-a185, the next screen will show you 2 folders: certs and media.
    Another way is opening windows explorer and on the left under network, see the computers listed on the network, find playbook-a185, click on it and will open the folders.
    Note: make sure you have file sharing and wifi sharing ON on the playbook. I turn OFF password protect so will be easier to access your files, and when you are done, you can turn password protection ON.
    Give kudos by clicking on the start please.
    Thanks!!

  • How do I delete old email addresses from the pop up list that comes up when I put a letter into the "To" box. These addresses are not in my address book.

    How do I delete old email addresses from the pop-up list that comes up when I put a letter into the "To" box? They are not in my Address Book.  Wrong addresses get in the way and I sometimes select the wrong one.

    Edit the list the comes up when you go to the Window menu and select "Previous Recipients".
    charlie

  • HELP! I can't empty OR move files to and from the trash can in Lion

    Since upgrading to Lion I have been having problems with emptying AND moving items to and from the trashcan. I am trying to empty the bin and it's been stuck for like hours. What do I do?

    http://www.thexlab.com/faqs/trash.html

  • How to copy a files name and spotlight comments to a text file for an entire folder

    I have movie covers saved as a jpeg for every movie my family and I own. There is about 700 and they each have a comment of the main actors, release dates, and descriptions. This makes it easy to find what to watch. I want my parents to have all of this info but they have a windows laptop so the comments don't transfer with the file and can't be searched like you can on a mac. Is there an applescript, automator, program I can download,  or program code supported in xcode that will do at least one of the following things?
    1)Take the name of the picture file and spotlight comment, copy and paste it into a text document like word that looks like this...
    File Name1- Spotlight Comment for file 1
    File Name 2- Spotlight Comment for file 2
    . for all 700 files in a folder
    2) It would be equally helpful if there was something that would take the name of the picture file and spotlight comment, copy and paste it to a movie file's comments with the same name but obviously has different extention. For an example
    In a Pictures folder
    Name: Dark Knight, The.jpeg       Comment: (2008) Genre: Action...             <- copy comment
    In a Movie Folder
    Name: Dark Knight, The.m4v       Comment:                                               <- paste 
    and do this for all 700 files
    3) Is there a free photo program that works on mac and windows that I can put all my movie pictures in and have a description like I did with the comments? It would also need a place that to search the description for keywords. So Basically an itunes for pictures that works on both mac and windows. If so I still need a way to get the spotlight comments to the description.
    4) I feel like this would make things more difficult, but if not I can put all of the .m4v files in itunes so instead of pasting all the comments back into a file in finder paste them in a description in itunes
    5) At the very least a code that I can run one by one for every file that will paste the comments into the same document
    Note: When I say spotlight comments I mean the comment box that is available when you click on get info of a file. The pictures are in the pictures section of finder in a folder called Movie Pictures. The movie files are on an external hard-drive in a file called Movies. Also I am slightly familiar with applescript and automater in that I have used both to create keyboard shortcuts and simple voice commands. I have programmed in c++ and C too. So If you give me a code for applescript I do know what to do with it.
    Thanks to anyone who takes the time to read all of this and extra thanks to anyone who tries to help.

    Clendenen02 wrote:
    2) It would be equally helpful if there was something that would take the name of the picture file and spotlight comment, copy and paste it to a movie file's comments with the same name but obviously has different extention. For an example
    In a Pictures folder
    Name: Dark Knight, The.jpeg       Comment: (2008) Genre: Action...             <- copy comment
    In a Movie Folder
    Name: Dark Knight, The.m4v       Comment:                                               <- paste 
    and do this for all 700 files
    This Bash script will do it.
    Edit "PicDir" and "MovDir" to the location of your Folders
    (Note: The comment is written to the m4v file using xattr, so the Spotlight comment field appears blank in Finder, but the comment metadata is still indexed by Spotlight (If you add a Spotlight comment from Finder, it is stored both as an extended attribute and in a .DS_Store file)
    #!/bin/bash
    PicDir=$HOME/Desktop/Pictures
    MovDir=$HOME/Desktop/Movies
    for f in $PicDir/*
    do
         if [ ! -d "$f" -a "${f##*.}" == "jpeg" ]; then
              comment=$(mdls -raw -name kMDItemFinderComment "$f")
              if [[ $comment != "(null)" ]]; then
                   picname=${f##*/}
                   movname=${picname%.*}.m4v
                   if [ -e "$MovDir"/$movname ]; then
                         xattr -w com.apple.metadata:kMDItemFinderComment "\"$comment\"" "$MovDir"/$movname
                   fi
              fi
         fi
    done

  • How to copy .vmg files to phone from pc?

    Hi. My phone is a N73. Before performing a hard reset on my phone (I had to for some reason), I copied all my sms messages from Inbox, Sent Items, Drafts and Outbox to my pc using Nokia PC Suite. Now I want to restore those messages to phone again. I simply tried to copy and paste those to the corresponding folders on my phone, but the 'paste' option is disabled. I am out of any clues how to deal with this issue. Please anybody tell me how to do this? Thanks.

    hello
    my first post you can copy the message (drag and drop the vmg) in to 'my folders in nokia communication center, 
    then in the phone you go to my folder where all the imported messages will be and do options mark all and move to inbox. 
    it worked with a 5800 but i presume that any phone is the same
    it worked from messages coming from a sony ericsson. so not sms related as long as it is in vmg. 
    cheers. 

  • How to get target file name and buffer the incoming messages?

    Hi Experts
    I have one scenarion like
    I wanted to find whether is there any file existing in target folder. If it exists I dont want to overwrite it but I have to buffer the incoming messages in some queue or something like that. And when ever the request comes next time I have to send the data buffered in queue first.
    I dont want to add any time stamp for target file to avoide duplication.
    Can we do this using XI. If yes please suggest me how to achive this.
    Regards
    Sowmya

    >
    Sowmya wrote:
    > Hi Experts
    >
    > I have one scenarion like
    > I wanted to find whether is there any file existing in target folder. If it exists I dont want to overwrite it but I have to buffer the incoming messages in some queue or something like that. And when ever the request comes next time I have to send the data buffered in queue first.
    >
    > I dont want to add any time stamp for target file to avoide duplication.
    >
    > Can we do this using XI. If yes please suggest me how to achive this.
    >
    >
    > Regards
    > Sowmya
    there is no standard way to achieve this. I suggest a redesign.
    post the files to a different directory and write a script which will move the file to the required target directory only if it is not present there.

  • How do i deregister my MacBook Pro from the current apple ID that it is connected to?

    I just got a new MacBook Pro laptop and i unintentionally registered it with an apple ID which i dont wish it to be registered to. How could i "deregister" from the apple ID I am currently connected to? Anything helps, thanks!

    zitzerman,
    you’d need to boot into Recovery mode by holding down ⌘R as your MacBook Pro starts up. When the OS X Utilities menu appears, select Disk Utility. Run Disk Utility to completely erase your internal disk; after it’s been erased, exit Disk Utility and select Shut Down from the Apple menu. When you restart it, OS X Internet Recovery will redownload your MacBook Pro’s original version of OS X from Apple’s servers, and then install it. When you run it, the welcome video will play; reïnitialize it to your liking, associating it with your preferred Apple ID. When you log in, run Software Update to get it up to date in its installed version of OS X.

  • How do I remove an SD card from the CD-ROM Drive that also has a CD stuck in the drive?

    Hi!  I need some assistance.  We had an individual accidently miss the SD slot on the iMac and placed the SD card into the CD-ROM Drive of the computer. On top of that, a CD was placed in the drive as well and will no longer eject.  Is there a way for me to remove both the CD and the SD card? 

    The most common method is to fashion an L shape out of cardboard (business card eg) turn the iMac on it's side and fish for the intruder.
    As you now have 2 things in the drive this may not work, if so it's a trip to the Apple Store for extraction.

  • How to disable "This file was downloaded from the internet" prompts?

    They're annoying.  I always say "yes" and I think they cause problems sometimes when I use these files with Terminal.  How do I get rid of them, if I can?

    If you do that, you may lose the new XProtect malware detection feature as well. See
    About file quarantine in Mac OS X v10.5 and v10.6

  • How to transfer files to and from iPad air using bluetooth

    How can I transfer file to and from my iPad using Bluetooth to another Bluetooth-enabled device?  Is there an app for this? 

    iOS devices do not have the Bluetooth profile for file transfer. Even if the other device is a an iOS device, you can't transfer files over BT. You can use Airdrop between iOS devices. However, even though Airdrop uses BT to locate other devices, the actual transfer is done over WiFi. There are some apps in the App Store that, if loaded on both iOS devices will allow limited file transfer over BT between the devices.

  • Cannot transfer files to and from WebDav server

    I having much difficulty transferring files to and from our new WebDav server when using Finder's Connect to Server. I am able to connect and authenticate just fine. Although, when dragging and dropping to a mounted drive, I receive the following errors, then subsequently dropped from the sever.
    ...Unexpected Error Occurred - Error code 1407
    ...cannot comple the operation because some data in "" could not be read or written - Error code 36
    ...Unexpected Error Occurred - Error code 1407
    This seems to be an issue affecting all 10.5 users in our university. PC's and 10.4 do not seem to be having this issue. When using CyberDuck and Goliath, I cannot login to the server whatsoever.
    Any thoughts?

    Same problem here with the finder.
    But Cyberduck (ver. 3.2, build 4648) works fine.

  • I am trying to burn a dvd and it will not allow me to do this because it states that i do not have enough space for encoding disk. how do i free up space and from where?

    I am trying to burn a dvd and it will not allow me to do this because it states I do not have enough space for encoding. how do i free up space and from where?

    iDVD can only use your startup hard disk for the "scratch space" it needs for calculations during the encoding process.  25 GB is a good average requirement, but a large project (3 or 4 hours of content) might require more.
    To free up space, you will have to move items to an external hard drive and/or delete items you no longer want.
    Please note that iDVD can't use and external hard drive for this "scratch space".

  • How do I make a DVD copy of a file? And does the file have to be converted from mpeg or mp4 or.MOV to a different format before it can be copied and is readable by DVD? Thanks.

    How do I make a DVD copy of a file? And does the file have to be converted from mpeg or mp4 or.MOV to a different format before it can be copied and is readable by DVD? Thanks.

    Great hearing for you all! I thought I was all alone this past weekend. I did learn a lot this weekend. I really like the InDesign product.(half-the-battle) But to be helped by the prestigious “Sandee Cohen” was an honor indeed.”  I ordered the InDesign CC today.  Peter, I appreciate all the feedback on Lynda too. They are loaded with lots of good videos. Derek too honed in on one of the most important aspects!  Since I have been working with Word for most of the first portion of the book this will be a big help. I looked at the comments big help ! Thanks a ton ALL!  Have a wonder day or evening whenever you read this reply.

Maybe you are looking for

  • After Effects Crash Problem With Program?

    Hi Adobe Staff. I have a problem with Adobe After Effects. The Program always Crashes. Is there a way to fix this problem. so the program does no longer crash. when I use the program. If you guys can help me I would greatly appriciate it. Thank You.

  • Bridge CS4 does not open in last folder user

    Bridge does not open all of the time in the last folder used. It will open in a previous folder. Any ideas?

  • Pls confirm SMB over TCP/IP w/o NetBIOS (port 445)

    Pls confirm that Mac OS X natively supports SMB over TCP/IP w/o NetBIOS layer, i.e. have you been able to connect to a Windows mashine on port 445 (not 139) w/o port remapping. MB 2.0   Mac OS X (10.4.9)  

  • Opening PDF emails

    I have Adobe Reader X. Starting approx. 9 months ago, I cannot open email PDF's without saving to desktop and then opening. I have WIN 7 and use MS Outlook 2003. All Adobe updates are current. Had no problem prior to 9 months ago with opening email P

  • URGENT OT - Very Puzzled IIS Authentication

    Hi All My appologies for the URGENT OT shout but I need to get this sorted by 06:00 GMT otherwise I am going to have 150 screaming intranet users moaning at me. Win 2k Server ASP.NET 2 I have just deployed our shiny new ASP.NET 2 Intranet app and wan