Quick script - backup multiple Alcatel OmniSwitch configuration files
A quick batch script I did to backup configuration files of multiple Alcatel Omniswitch via FTP.
In the switch flash all configuration files are named boot.cfg so the script renames each file appending the IP address of the device to avoid conflicts.
We start creating a file iplist.txt with all the IP of switches to backup
Content
10.10.29.10
10.12.29.10
10.14.29.10
10.14.29.11
10.14.29.12
10.14.29.13
10.14.29.14
10.14.29.15
Now create a FTP script named ftp.scr to login and backup the configuration
admin
switch
cd ..
cd working
get boot.cfg
quit
Info
Default credentials are user "admin" password "switch"
Now we can create the actual script getconfig.bat that will perform the backup
for /f "tokens=*" %%i in (iplist.txt) do (
echo %%i
ftp -s:ftp.scr %%i
ren boot.cfg boot.cfg-%%i )
Now we just have to run the script and see the magic happen!