cancel
Showing results for 
Search instead for 
Did you mean: 

Config Archive for Arista Devices

Config Archive for Arista Devices

aloeffle
Contributor
Dear all.

we want to archive the device configuration of our Arista Switches with XMC. Does anyone have experience if this is possible?

thanks and best regards
Alex
4 REPLIES 4

Zdeněk_Pala
Extreme Employee
Hi.

here is inspiration at GitHub.

feel free to share!

Z.
Regards Zdeněk Pala

aloeffle
Contributor
Hello Ryan.

thanks for your detailed explanation. Sound good. I will give it a try and come back to you with my results.

Best regards
Alex

Ryan_Yacobucci
Extreme Employee
Just a quick note. Sometimes trailing spaces are added during copy/paste functions. Make sure there are no trailing spaces when you copy that script.

Ryan_Yacobucci
Extreme Employee
Hello,

If the Arista device can send it's configuration via TFTP/SCP/FTP we should be able to create a script to send the backup over to XMC.

XMC will need to be able to SSH/Telnet into the device and give it the necessary commands to send the backup file to a remote server with TFTP/SCP/FTP

I have pulled a script currently used for Cisco TFTP and we can modify it to work with the Arista.

Here is the script:

-- Use these scripts to manage Cisco devices
name="Arista - TFTP"
desc="Arista SSH/TFTP Scripts"
protocol=TFTP
--
-----BEGIN SCRIPT "Configuration Upload"-----
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-----
-----BEGIN SUCCESS "Configuration Download"-----
bytes copied
-----END SUCCESS-----


What you need to do is figure out the commands required to upload/download configuration for the Arista and modify the script modules accordingly.

Example:

For the Configuration Upload:

-----BEGIN SCRIPT "Configuration Upload"-----
copy running-config tftp:
%TFTP_IP%
%RELATIVE_TARGET_FILE_PATH%
@receive 40
exit
-----END SCRIPT----

These are the commands that work with Cisco, you'll need to remove the content and put the appropriate commands that Arista uses for TFTP transfer.

You will want the Arista to send it's configuration to %RELATIVE_TARGET_FILE_PATH% which will be dynamically generated at the time of the backup.


For the Success portions:

-----BEGIN SUCCESS "Configuration Upload"-----
bytes copied
-----END SUCCESS-----

You'll want to input a string that lets XMC know the process was successfully completed. If there is a string that we can look for after the file has been transfer use it here.


Once you've modified the script place it in the following directory:

/usr/local/Extreme_Networks/NetSight/appdata/InventoryMgr/properties/devicefiles

Once completed right click the Arista Device --> Configuration/Firmware --> Set Configuration

Make sure the device is mapped to use TFTP, and that the new script is selected.

Give the script a try.

If unsuccessful go to Administration --> Diagnostics --> Server --> Server Diagnostics and set "Telnet/SSH command shell" and "Inventory Manager" to "Verbose" and run the test again.

The /usr/local/Extreme_Networks/NetSight/appdata/logs/server.log will output diagnostic information about the script being generated and executed.

Make sure the profile assigned to the device has relevant CLI credentials and terminal access method to SSH/Telnet into the script.

Also make sure if any "enable" command is necessary to get into the appropriate CLI mode that it is included in the script.

Thanks
-Ryan
GTM-P2G8KFN