Automatic backup of IP Office configuation
I’ve recently been looking at automating backups of network devices such as switches, access points and other devices. I recently knocked up a quick batch script to backup Avaya IPOffice phone systems (It’d probably work on the older Lucent ArgentOffice too). Save the following as Backup.bat:
@echo off REM ================================================================ REM CONFIGURATION INFO REM ================================================================ set CFGFILE=BackupList.txt set DESTDIR=C:\Backups\ REM ================================================================ REM STOP CHANGING HERE OR YOU'LL BREAK SOMETHING REM ================================================================ SET TIMESTAMP=%date:~-4,4%.%date:~-7,2%.%date:~-10,2% for /F "tokens=1,2 delims=," %%A in (%CFGFILE%) do ( IF NOT EXIST "%DESTDIR%%TIMESTAMP%" mkdir "%DESTDIR%%TIMESTAMP%" > NUL echo %%B tftp -i %%B GET config "%DESTDIR%%TIMESTAMP%\%%A.cfg" > NUL )
In the same directory create a TXT file named BackupList.txt. Add phone systems to the file that should be backed up in Name,ip address format. A sample BackupList.txt file might look like:
London Phone System,192.168.1.1 New York phone System, 192.168.2.1
You’ll also need to download the following free TFTP client from Tandom Systems Ltd. Place it in the same directory as the other two files.
Then run Backup.bat to backup all your phone systems.