Hello,
I would like to know how to backup the configuration of IB Melannox switch SX6036?
Thank you.
ggcc
Hello,
I would like to know how to backup the configuration of IB Melannox switch SX6036?
Thank you.
ggcc
Do you have the User Manual of MLNX-OS? (see here Where can I find the Switch OS User Manual https://community.mellanox.com/s/article/where-can-i-find-the-switch-os-user-manual )
Refer to the Configuration Management chapter.
Most commands start with "configuration write … "
if you read the chapter, and still don’t manage to understand, let me know.
Thanks,
Ophir.
Hi Ophir,
Thank you for your information. Sorry, I didn’t post my question clearly.
I should ask: How do you do you backup your Mellanox switch to a remote server?
I have written a small script to do the backup. But, it didn’t work for Mellanox. However, with a small change, the script it will work for Cisco router, switches etc…
After “show run” it didn’t display the configuration.
Here is the expect script on a Linux server.
#!/usr/bin/expect
set timeout 10
set name “admin”
set pass1 “admin”
set hostlist “mellanox1”
spawn ssh $name@$hostlist
expect “Password:”
send “$pass1\r”
expect “*>”
send “enable\r”
expect “*#”
send “terminal length 800\r”
expect “*#”
set time [exec date +%y%m%d]
set filename $hostlist-$time
log_file /home/mydir/$filename
send “\r”
expect “*#”
send “show run\r”
expect “*#”
send “exit\r”
log_file
Hi,
See below the suggested changes.
Ophir.
#!/usr/bin/expect
set timeout 10
set name “admin”
set pass1 “admin”
set hostlist “mellanox1”
spawn ssh $name@$hostlist
expect “Password:”
send “$pass1\r”
expect “*>”
send “enable\r”
expect “*#”
send “terminal length 800\r”
expect “*#”
send “no cli session paging enable\r”
expect “*#”
set time [exec date +%y%m%d]
set filename $hostlist-$time
log_file /home/mydir/$filename
send “\r”
expect “*#”
send “show run\r”
expect “*#]”
send “exit\r”
log_file
Yes, you are right. Thank you for your help.
My coworker replaced expect “*#]” with expect “$” and it works.