02-16-2026 06:37 AM
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.
02-16-2026 06:46 AM
- @Cisco1619 You say : ....not working properly...
How is that observed , do you get an error somewhere ?
M.
02-16-2026 06:48 AM
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.
02-16-2026 06:58 AM
- @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.
02-16-2026 11:14 AM
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)
02-16-2026 11:55 AM
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.
=====️ Preenayamo Vasudevam ️=====
***** Rate All Helpful Responses *****
02-17-2026 06:15 AM
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!
02-17-2026 07:27 AM
What kind of SFTP Server is it, Linux-based or Windows-based?
=====️ Preenayamo Vasudevam ️=====
***** Rate All Helpful Responses *****
02-17-2026 07:29 AM
It is a Windows based server.
02-17-2026 07:47 AM
- @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.
02-17-2026 07:49 AM
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.
=====️ Preenayamo Vasudevam ️=====
***** Rate All Helpful Responses *****
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide