Monday, May 19, 2014

backup and restore extreme switch configuration file using mac tftp server

http://www.youtube.com/watch?v=g3e52b6N3zE

On the Mac Server

download TFTP server for mac.
http://www.macupdate.com/app/mac/11116/tftpserver

after installed change the path to a local user to fix working path permission.
the default tftpd path is set on the tftp.plist file and needs to be change

make sure firewall is not blocking default 69 UDP tftp port.

Also create a file with the same name of the backup configuration file that you will assign on the switch on the next step, prior tftp put command execution.
On this example primary_223backup.cfg


On the Extreme switch
show switch command will display the configuration filename that the switch is using as a primary configuration and booted file.

X450a-48t-223.2 # show switch

SysName:          X450a-48t-223
SysLocation:
SysContact:       support@extremenetworks.com, +1 888 257 3000
System MAC:       00:04:96:27:90:8B
System Type:      X450a-48t

SysHealth check:  Enabled (Normal)
Recovery Mode:    All
System Watchdog:  Enabled

Current Time:     Mon May 19 11:53:44 2014
Timezone:         [Auto DST Disabled] GMT Offset: 0 minutes, name is UTC.
Boot Time:        Wed Mar 13 14:30:34 2013
Boot Count:       23
Next Reboot:      None scheduled
System UpTime:    431 days 21 hours 23 minutes 9 seconds

Current State:    OPERATIONAL
Image Selected:   primary
Image Booted:     primary
Primary ver:      12.0.1.11
Secondary ver:    11.5.2.10

Config Selected:  primary.cfg
Config Booted:    primary.cfg

primary.cfg       Created by ExtremeXOS version 12.0.1.11
                  154613 bytes saved on Thu Apr 24 17:06:20 2014

X450a-48t-223.1 # ls
-rw-r--r--    1 root     0            2775 Nov  1  2007 Restrict_NMS.pol
-rw-rw-rw-    1 root     0          154613 Apr 24 17:06 primary.cfg

 1k-blocks      Used Available Use%
     16384       480     15904   3%

save configuration command will copy the primary configuration file to another filename.

X450a-48t-223.4 # save configuration primary_223backup
Do you want to save configuration to primary_223backup.cfg? (y/N) Yes
Saving configuration on master ........ done!
Configuration saved to primary_223backup.cfg successfully.

The current selected default configuration database to boot up the system
(primary.cfg) is different than the one just saved (primary_223backup.cfg).
Do you want to make primary_223backup.cfg the default database? (y/N) No
Default configuration database selection cancelled.

tftp command will save the backup configuration file into the TFTP server.

X450a-48t-223.6 # tftp 10.7.40.253 -v vr-default -p -l primary_223backup.cfg
Uploading primary_223backup.cfg to 10.7.40.253 ... done!

use tftp command to restore the backup configuration file back into the switch

X450a-48t-223.7 # ls
-rw-r--r--    1 root     0            2775 Nov  1  2007 Restrict_NMS.pol
-rw-rw-rw-    1 root     0          154613 Apr 24 17:06 primary.cfg
-rw-rw-rw-    1 root     0          154613 May 19 11:54 primary_223backup.cfg

 1k-blocks      Used Available Use%
     16384       504     15880   3%

X450a-48t-223.8 # rm primary_223backup.cfg
Remove primary_223backup.cfg from switch? (y/N) Yes

X450a-48t-223.9 # ls
-rw-r--r--    1 root     0            2775 Nov  1  2007 Restrict_NMS.pol
-rw-rw-rw-    1 root     0          154613 Apr 24 17:06 primary.cfg

 1k-blocks      Used Available Use%
     16384       504     15880   3%

X450a-48t-223.10 # tftp 10.7.40.253 -v vr-default -g -l primary_223backup.cfg
Downloading primary_223backup.cfg to switch.... done!
X450a-48t-223.11 # ls
-rw-r--r--    1 root     0            2775 Nov  1  2007 Restrict_NMS.pol
-rw-rw-rw-    1 root     0          154613 Apr 24 17:06 primary.cfg
-rw-r--r--    1 root     0          154613 May 19 12:16 primary_223backup.cfg

 1k-blocks      Used Available Use%
     16384       528     15856   3%



1 comment: