• September 22, 2020, 04:50:40 PM
Welcome, Guest. Please login or register. Registration is free.
Did you miss your activation email?

Author Topic: How to create a backup file on WiNG 5.5  (Read 6785 times)

0 Members and 1 Guest are viewing this topic.

Offline dmurillocent

  • Rookie
  • **
  • Posts: 2
How to create a backup file on WiNG 5.5
« on: November 05, 2014, 07:14:22 AM »
Hello, I'm having troubles when I try to export the startup config on WiNG5, which is the CLI in order to export to and FTP?


Thanks.


Offline newdud

  • Jr. Member
  • **
  • Posts: 30
Re: How to create a backup file on WiNG 5.5
« Reply #1 on: November 05, 2014, 11:10:08 AM »
Use the GUI and cut and paste.
Much better

Offline Goose

  • Jr. Member
  • **
  • Posts: 33
Re: How to create a backup file on WiNG 5.5
« Reply #2 on: November 06, 2014, 09:16:36 AM »

TFTP_IP_ADDR= your TFTP server's IP

so in cli:

en
copy nvram:startup-config tftp://TFTP_IP_ADDR/startup-config.cfg
-----------------------------------------------------------------------------------------

copy ?
  /recursive  Copy contents of one dir to another
  FILE        File from which to copy
              Files: flash:/path/file
                     nvram:startup-config
                     system:running-config
  URL         URL from which to copy
              URLs:  tftp://<hostname|IP>[:port]/path/file
                     ftp://<user>:<passwd>@<hostname|IP>[:port]/path/file
                     sftp://<user>:<passwd>@<hostname|IP>[:port]>/path/file
                     http://<hostname|IP>[:port]/path/file
              IPv6 URLs:  tftp://<hostname|[IPv6]>[:port]/path/file
                     ftp://<user>:<passwd>@<hostname|[IPv6]>[:port]/path/file
                     sftp://<user>:<passwd>@<hostname|[IPv6]>[:port]/path/file
                     http://<hostname|[IPv6]>[:port]/path/file

Offline VisionID

  • Rookie
  • **
  • Posts: 1
    • ie.linkedin.com/in/FlemingSimon
Re: How to create a backup file on WiNG 5.5
« Reply #3 on: February 10, 2015, 11:03:29 AM »
how do you re-import it once you have copied and pasted?

Offline leonardo.ortiz

  • Rookie
  • **
  • Posts: 22
Re: How to create a backup file on WiNG 5.5
« Reply #4 on: February 17, 2015, 09:47:49 AM »
Copy and paste again :D. The configuration is just an script, when you copy and paste, the switch will execute line per line as a command.

You can copy the config file using tftp and save into nvram as "startup-config", them just restart the switch, but can be dangerous cause the backuped file can be corrupted.

To make backups, I have created a script, like this:

Quote
#!/bin/bash
#Resp.: Leonardo Ortiz



rfs_sc1="10.9.40.49"
rfs_sc2="10.9.40.50"
rfs_ce1="10.200.40.49"
rfs_ce2="10.200.40.50"

echo "--------- Script $(basename $0)- $(date +%d/%m/%Y-%H:%M:%S) iniciado --------" >> /marisol/log/rfs6000/$(basename $0)-$(date +%d-%m-%Y).log

remover_antigos(){
        find /marisol/backup/rfs6000 -mtime +31 -exec rm -f {} \;
}

for rfs in $rfs_sc1 $rfs_sc2 $rfs_ce1 $rfs_ce2; do
[ $rfs = "10.9.40.49" ] && rfsver="rfs-sc-primario"
[ $rfs = "10.9.40.50" ] && rfsver="rfs-sc-secundario"
[ $rfs = "10.200.40.49" ] && rfsver="rfs-ce-primario"
[ $rfs = "10.200.40.50" ] && rfsver="rfs-ce-secundario"

        expect -c "
        spawn ssh -l admin "$rfs"
        expect \"Username\"
        send \"admin \r\"
        expect \"Password\"
        send \"superuser \r\"
        expect \"\n\"
        send \"enable\n\"
        expect \"\n\"
        send \"write\n\"
        send \"copy startup-config ftp://rfs6000:wireless@10.9.3.57/$rfsver-$(date +%d-%m-%Y)\n\"
        expect \"%\"
        send \"exit\r\"
        " >> /marisol/log/rfs6000/$(basename $0)-$(date +%d-%m-%Y).log

done
#compactar os arquivos
cd /marisol/backup/rfs6000/ && tar -czf rfs6000-$(date +%d-%m-%Y).tar.gz *$(date +%d-%m-%Y)
rm -f /marisol/backup/rfs6000/*$(date +%d-%m-%Y)
remover_antigos
echo -e "\n--------- Script $(basename $0)- $(date +%d/%m/%Y-%H:%M:%S) executado com sucesso --------" >> /marisol/log/rfs6000/$(basename $0)-$(date +%d-%m-%Y).log

This script make a backup and save into my Linux Machine. The script delete old backups (more than 1 month).