cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
759
Views
0
Helpful
3
Replies

Prime 2.1 CLI-Template Copy to FTP

dappers
Level 1
Level 1

Hello everybody,

 

I want to write a CLI-Template to save the startup-config to a FTP-Server. So here ist my template:

 

#MODE_ENABLE
#INTERACTIVE
copy running-config ftp: <IQ>remote host<R>$ftpserver<IQ>filename<R>${IPAddress}.txt
#ENDS_INTERACTIVE
#MODE_END_ENABLE

 

My problem is: I want a filename, which include the hostname. Something like "switch-01-config.cfg". But I doesn't know the right way to get the hostname from a managed variable.

Finally I want to save configs from many switches to one ftp server I define.

 

 I hope someone can help me. Thanks in advance.

 

Christian

3 Replies 3

Vinod Arya
Cisco Employee
Cisco Employee

Not sure if this is possible, as the script may not be able get a unique input for each device to write it to FTP server.

But there is one option, where you can run a script on PI server which can fetch configuration from database for all the devices and dump it into a directory.

You can use this latest configs to be exported to another FTP server at once.

This seem to be one of the viable option on what you're trying to achieve. I can wait for other community members to share their expert suggestions.

-Thanks

Vinod

-Thanks Vinod **Rating Encourages contributors, and its really free. **

Hello Vinod,

can you please explain how to fetch the configurations from the database with a script?

 

BR

Bastian

Please share us the script that can be used to fetch configurations from the database.

 

Thanks

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: