Copy TFTP Syntax

Unanswered Question
Dec 5th, 2011

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://” 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://…

Copy run tftp://…

Copy run tftp://…

Copy run 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 have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
JohnTylerPearce Mon, 12/05/2011 - 12:11

What type of router are you using?

rmeans Mon, 12/05/2011 - 12:13

A mix of routers and switches.  Most routers are 2800, 3800 and 3900.  Switches are mostly 3750.

JohnTylerPearce Mon, 12/05/2011 - 12:43

I'm assuming you have IP connectivity to them?

JohnTylerPearce Mon, 12/05/2011 - 12:49

copy system:running-config tftp:[[[//location]/directory]/filename]

copy run tftp:// -> Seems like it should work

Richard Burts Mon, 12/05/2011 - 13:09

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?



JohnTylerPearce Mon, 12/05/2011 - 13:16

It you can ping successfully, it could be any issue with the TFTP server as Richard suggested.

Or maybe an ACL is blocking it somewhere?

rmeans Mon, 12/05/2011 - 13:20

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://"  (notice the final / )

! the final / should allow the router/switch to automatically insert the filename of -confg

The device responds asking for confirmation in the tftp server IP address (

The next question is filename

the devices that show a filename of "/tftpboot/configs/-confg" - work as expected

the devices that show a filename of "-confg" - do not work as expected

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://", the 2811 works as expected.  When asked to confirm the filename, the filename shows "/tftpboot/configs/-confg"

It appears the routers and switches interpret the final "/" differently.

Leo Laohoo Mon, 12/05/2011 - 13:27

Have you tried this new command before?

sh run | redirect tftp:///directory/directory/directory/filename.txt

Leo Laohoo Mon, 12/05/2011 - 13:19

What is your TFTP client?

rmeans Mon, 12/05/2011 - 14:03

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).

rmeans Mon, 12/05/2011 - 14:04

The clients are the routers and switches.  The server is a AIX system.


Login or Register to take actions

This Discussion

Posted December 5, 2011 at 11:11 AM
Replies:11 Overall Rating:
Views:6989 Votes:0
Tags: tftp

Related Content


Discussions Leaderboard

Rank Username Points
Giuseppe Larosa
Paolo Bevilacqua
Richard Burts
Jon Marshall
Peter Paluch
Rank Username Points
Jon Marshall
Peter Paluch
Joseph W. Doherty
Leo Laohoo
Vasilii Mikhail...