cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
561
Views
0
Helpful
10
Replies

Issues backing up 9800 WLC using archive command

Cisco1619
Level 3
Level 3

I am trying to configure a 9800 to automatically back up the configurations using SCP when someone issues the write-memory command. I have it successfully backing up to the root folder on the SCP server target, but I can't get it to put it into the subfolder that it needs to go into. It seems simple but it isn't working for me. It is using the file path as the file name. Here is my configurations.

Working configuration - puts in root directory:

9800-1#sh run | sec archive
archive
path scp://username:password@10.1.2.6//$h
write-memory
9800-1#

Configuration does not work properly:

9800-1#sh run | sec archive
archive
path scp://username:password@10.1.2.6://SFTP_Root/wireless/$h
write-memory
9800-1#

Thanks for any assistance.

10 Replies 10

Mark Elsen
Hall of Fame
Hall of Fame

 

  - @Cisco1619                   You say : ....not working properly...
                                            How is that observed , do you get an error somewhere ?

  M.



-- Let everything happen to you  
       Beauty and terror
      Just keep going    
       No feeling is final
Reiner Maria Rilke (1899)

We are able to see the files going to the root folder on the server, but I am not able to get the transfer to go into the subfolder.

 

  - @Cisco1619      I was also observing that each instance , working and not working contain two // in the command
                              Here is an example to backup the configuration every 24h :
                              The // is only used once after the sftp string , perhaps try the change together
                              with your own parameters for the needed command.

 ! Setup automatic configuration backup to SFTP/SCP/FTP/TFTP server.
! Can execute on "write mem" or in set time intervals, or both.
! If you are using SFTP/SCP, you must allow "transport output ssh" on VTY lines.
! If your WLC has VRFs, you will need "ip ssh/ftp/tftp source-interface X" or it won't work.
archive
    log config
        logging enable
    path sftp://username:password@10.10.11.100/WLC/$h_$t
    write-memory
    time-period 1440

  It was found in : https://www.wiresandwi.fi/blog/cisco-wlc-9800-base-initial-configuration-cli

 M.



-- Let everything happen to you  
       Beauty and terror
      Just keep going    
       No feeling is final
Reiner Maria Rilke (1899)

pieterh
VIP
VIP

two suggestions:
- does the file already exist in the subfolder? the user may not have permission to create new files, ony modify existing files
- you can also set the home-directory of the user to the subfolder? (or create a new user especially for the copy)

balaji.bandi
Hall of Fame
Hall of Fame

Could you confirm that the Directory already exists and that you can write to the file? I do not believe I can create the folders.

I generally use the following, and it works :

archive
 path scp://username:password@10.1.2.6/SFTP_Root/wireless/$h
 write-memory

Note: I expected SFTP to work; you only have an issue sending files to SFTP. 

BB

=====️ Preenayamo Vasudevam ️=====

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Yes, the folder structure is in place, but nothing I do will put the file into the subfolder. The client though is Ok with leaving it in the root folder, so I am not going to have to resolve this. At this point I believe it probably is server permission issue, but I can't prove it. Either way, my client is Ok with what we have, so I will let it be. Thanks for all the assistance!

What kind of SFTP Server is it, Linux-based or Windows-based?

 

BB

=====️ Preenayamo Vasudevam ️=====

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

It is a Windows based server.

 

  - @Cisco1619    You could for instance also check the logs of the (scp)/SSH server and check what happens
                             if the SSH server receives the file or tries too. Some ssh server brands  will let you
                             run the SSH server in debug mode to get additional details (e.g.)

  M.



-- Let everything happen to you  
       Beauty and terror
      Just keep going    
       No feeling is final
Reiner Maria Rilke (1899)

This indicates that the user-provided account lacks the necessary permissions to create a directory. As you mentioned, could you contact the admin to sort that? This has nothing to do with the WLC controller.

BB

=====️ Preenayamo Vasudevam ️=====

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Review Cisco Networking for a $25 gift card