11-17-2014 11:35 PM
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
11-18-2014 07:13 AM
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
11-18-2014 03:01 PM
Hello Vinod,
can you please explain how to fetch the configurations from the database with a script?
BR
Bastian
12-29-2014 01:38 AM
Please share us the script that can be used to fetch configurations from the database.
Thanks
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: