How to automatically backup Extreme Networks switches ?

Here is a useful article about how to automatically backup Extreme Networks switches.

Pre-requisites

Please follow this pre-requisites before going further in this article :

  • You need an IPv4 TFTP server ready to receive switches backups (with “write” permissions).
  • You need any ExtremeXOS switch (running EXOS 12.3.X or higher).

Backup script

As you know if you’re reading this lines, you can run “.xsf” or “.py” scripts on EXOS equipments.

Our goal is to set a backup script which will be launched automatically every week.

Extreme Networks provide a good one on their GitHub : backup.xsf

Download a copy of it and modify “tftp” (line 40) and “vrtr” (line 41) variables as this (example) :

set var tftp 172.16.0.200
set var vrtr VR-Default

Upload this script to your switch.

Before working on automation, please try to launch the script manually with the following command :

SW# load script backup.xsf

Now, check the presence of the backup file on your TFTP server, then follow the next step below.

Note : if there’s not any file on your TFTP server, check permissions and allowed IPs on it.

Setting UPM profile (event creation)

Let’s set the UPM profile (or event). This event will be called by the UPM timer on next step.

Use the following command to create the profile :

SW# create ups profile weeklybackup

Then you will be prompt to enter one command per line and “.” to end your prompt, proceed as follows :

Start typing the profile and end with a . as the first and the only character on a line.
Use - edit upm profile <name> - for block mode capability
load script backup.xsf
.

Save the configuration :

SW# save
The configuration file primary.cfg already exists.
Do you want to save configuration to primary.cfg and overwrite it? (y/N) Yes

You can check the creation of the profile with this command :

SW# show upm profile
================================================================================
UPM Profile          Events                 Flags Ports
================================================================================
weeklybackup                                   e 
================================================================================
Number of UPM Profiles: 1
Number of UPM Events in Queue for execution: 0
Flags: d - disabled, e - enabled
Event name: log-message(Log filter name) - Truncated to 20 chars

Setting UPM Timer

The UPM Timer will be use to call the UPM profile. We will set a frequency for this call.

For UPM Timer creation, use this command :

SW# create upm timer weeklybackup-timer

The configure frequency for this UPM Timer (each week) :

SW# configure upm timer weeklybackup-timer after 86400 every 604800 

Details :

  • “after 86400” means that the task will be run for the first time in 24h (86400 seconds)
  • “every 604800” means that the task will be executed each week (604800 seconds)

Now, we’re going to the link the timer to the profile :

SW# configure upm timer weeklybackup-timer profile weeklybackup

Then enable the profile :

SW# enable upm profile weeklybackup

Save the configuration :

SW# save
The configuration file primary.cfg already exists.
Do you want to save configuration to primary.cfg and overwrite it? (y/N) Yes

You can check the timer creation thanks to this command :

SW# show upm timers
Current Time: 2021-11-01 18:15:53
--------------------------------------------------------------------------------
UPM               Profile       Flags              Next Execution
Timer             Name                             time              
--------------------------------------------------------------------------------
weeklybackup-timer weeklybackup   ep            2021-11-02 18:15:21(Every 604800 secs)
--------------------------------------------------------------------------------

Number of UPM Timers: 1
Flags: e - Profile is enabled, d: Profile is disabled
       o -Timer is non-periodic, p - Timer is periodic

Details :

  • You can see the link between “UPM Timer” and “Profile Name”
  • The flag “e” means the profile is enable and the flag “p” means the timer is periodic (each week).
  • You can check the “Next Execution time”

Conclusion

You now have an automatic backup for your switches on a TFTP server.

Thanks for reading !

Leave a Reply