Toto je starší verze dokumentu!
3com
backup config
=4200 : ''tftp 192.168.1.115 put unit1>flash:/3comoscfg.cfg R2_206.cfg''\\ ''tftp 192.168.1.115 put flash:/3comoscfg.cfg R2_206.cfg'' =4500: ''backup startup-configuration to 192.168.1.115''
trunk
<4200G>system-view [4200G]interface GigabitEthernet 1/0/27 [4200G]port link-type trunk [4200G]port trunk permit vlan 2 4 50 to 100 [4200G]port trunk permit vlan all
automatické zálohování na tftp
#!/bin/sh ARCHIVE="sw-backup.tar.gz" TFTP="192.168.3.79" TFTP_DIR="/var/lib/tftpboot" IP="192.168.1.201 192.168.1.203 192.168.1.205 192.168.1.206 192.168.1.207 192.168.1.211 192.168.1.213 192.168.1.214 192.168.1.215 192.168.1.218 192.168.1.219 192.168.1.230" for ip in $IP; do /usr/bin/expect <<EOD set timeout 5 spawn telnet $ip expect "ame:" send "admin\r" expect "assword:" send "heslo\r" expect ">" send "\r" expect ">" send "di ver\r" expect { -re "Switch 4500G|Switch 4510G|HP A5120|HP A5500" { send "backup startup-configuration to $TFTP sw-$ip.cfg\r" expect "finished!" } -re "Switch 4500|Switch 5500G" { send "backup fabric current-configuration to $TFTP sw-$ip.cfg\r" expect "finished!" } "Switch 4200G" { send "tftp $TFTP put unit1>flash:/3comoscfg.cfg sw-$ip.cfg\r" expect "successfully." } } send "\r" EOD done tar -zcf /tmp/$ARCHIVE $TFTP_DIR/* uuencode /tmp/$ARCHIVE $ARCHIVE | mail -s "Switches backup" mail@mail.cz rm -f /tmp/$ARCHIVE
