I am trying to copy my running configuration to a specific directory on my TFTP server. I am using a single CLI command to execute the request.
I have successfully issued “copy run tftp://184.108.40.206//tftpboot/configs/” on many devices (mostly switches). My routers are failing. The router config files write to the default TFTP directory and not the specific directory. Something about the syntax fails.
I have tried
Copy run tftp://220.127.116.11:/tftp…
Copy run tftp://18.104.22.168://tftp…
Copy run tftp://22.214.171.124/tftp…
Copy run tftp://126.96.36.199//tftp…
All have failed.
When I issue “copy run tftp” and manually answer the questions, I have success. When I enter the destination filename, I type “/tftpboot/configs/router_config”.
I wonder if it could be an issue with the TFTP server. Can the original poster clarify whether he is able to get copy run tftp to work correctly to this server from some devices but not from others?
The purpose for the single line CLI is that I am using a script to send the command. I feel the script is correct because I can recreate the problem when I manually enter the commands.
I did another test and...
up to this point, I had been entering "copy run tftp://188.8.131.52//tftpboot/configs/" (notice the final / )
! the final / should allow the router/switch to automatically insert the filename of
The device responds asking for confirmation in the tftp server IP address (184.108.40.206)
The next question is filename
the devices that show a filename of "/tftpboot/configs/
the devices that show a filename of "
My test devices are a 4948 and a 2811. The 4948 works and the 2811 fails (doesn't TFTP to the directory I would like).
If I change my initial command to "copy run tftp://220.127.116.11//tftpboot/configs/
It appears the routers and switches interpret the final "/" differently.
If I provide a full path including the filename, the tftp transfer works. I hadn't wanted to do this because this will require additional work in my script. If you don't specify a filename, the device will insert one by default (hostname-confg).