cancel
Showing results for 
Search instead for 
Did you mean: 

backup a device configuration automatically using Extreme Management Center by FTP

backup a device configuration automatically using Extreme Management Center by FTP

NachoCursos
New Contributor
Hello,How can I backup a device configuration automatically using Extreme Management Center via FTP?In other words, NetSight sends the configurations of the switches it has configured via FTP to a server.Thanks a lot.
1 ACCEPTED SOLUTION

Tomasz
Valued Contributor II

Hi,

 

I’d consider cron + some simple bash script running underneath XMC for doing this. Optionally, if you manage the XMC appliance itself, you can also schedule a task like that. Or, if you set an alarm reacting on a new log message saying that backups were taken, Ubuntu script could be executed as an alarm action.

 

Hope that helps,

Tomasz

View solution in original post

10 REPLIES 10

bar
Contributor
I have the same problem.
I have an edited device file which uses tftp to copy a file.  I can select it in the XMC gui and although I select TFTP as the file transfer method when I attempt to save the inventory settings I get the error "the selected script does not match the selected file transfer method"

Two things would very much help diagnosis:
 is there any way I can see the output from the script as it is run?
is there any way I can see what the variables such as %RELATIVE_TARGET_FILE_PATH% are set to?

thanks.

Ed_McGuigan1
New Contributor III

Zdeněk Pala has been a great help here. There are quite a few sample scripts including the one that will do the job for me.

A couple of tidbits that might prevent confusion:

  1. You cannot just use a copy command from a device to check that the transfer works.
    XMC will not allow the file to be written under /tftpboot/configs/tmp so your attempt will fail.

    The script that runs on XMC clearly takes care of making sure that the write is allowed before the transfer starts.
    It also seems to process the file, placing it in the archives before deleting it.

  2. Running "tcpdump -v port 69" in a console window for XMC can provide some debugging help as to what is happening.

Zdeněk_Pala
Extreme Employee
I believe GitHub is excellent resource for this discussion. There are working examples shared and also links to the documentation...
Regards Zdeněk Pala

Ed_McGuigan1
New Contributor III
It looks like there is the ability to set up some custom scripts for different device types in order to be able to download/upload both configuration and firmware.

If you right click on a device and then select the "Archive-->Inventory Settings" option you get a dialog as follows:
MyCr7syFQR6r2iet0Eu6_InvSettings.png
Here you can select the file transfer protocol:
pCKhsrhgQS7xl51igGSA_FT_Options.png
You probably need to create a custom script that defines the commands that must be run on the device in order to initiate a download/upload. Here is a sample of some script for a Cisco device type:
-- Use these scripts to manage Cisco devices
name="Cisco Systems - TFTP"
desc="Cisco Systems 3750 SSH/TFTP Scripts"
protocol=TFTP
--
-----BEGIN SCRIPT "Configuration Upload"-----
enable
%ENABLEPSWD%
copy running-config tftp:
%TFTP_IP%
%RELATIVE_TARGET_FILE_PATH%
@receive 40
exit
-----END SCRIPT-----
-----BEGIN SUCCESS "Configuration Upload"-----
bytes copied
-----END SUCCESS-----
-----BEGIN SCRIPT "Configuration Download"-----
enable
%ENABLEPSWD%
copy %TFTP_URL% startup-config
startup-config
@receive 60
exit
-----END SCRIPT-----​

I am looking at this right now and there are two things:

  1. I don't know where these scripts are created or located ( guessing I may need to root around from the linux CLI )
  2. I don't understand the syntax of the script

I will add more information if I get anywhere with this.

====

So it seems that the file location question is answered at the following URL - https://extremeportal.force.com/ExtrArticleDetail?an=000091050&q=What-directory-do-you-put-custom-d...

The actual file path is:
/usr/local/Extreme_Networks/NetSight/appdata/InventoryMgr/properties/devicefiles

In that directory you find a file "DeviceFamilyDefTemplate.txt" that describes the format of a device file ( in some detail ).
Note that there are no other files in the directory so I don't know where the files are for the existing devices ( like a Cisco router for example ). I copied and pasted the Cisco example from the web interface into a new file "myNewDeviceType" in the directory and replaced Cisco with Dell-EMC inside the file and then I got a new option showing up in the Web interface:

YRLnZmcfQkSxsz7FN0ur_NewOption.png

NachoCursos
New Contributor

 

Thank you very much, do you mean that I can do it through the XCM itself? how?

GTM-P2G8KFN