Using Scripts for System Tasks
29
FS6300 NMS Administrator’s Reference Guide
1 • Managing System Operations
Executing the script to backup the database and logs directory
The NMS package includes a shell script for backing up the database contents and logs directory to the server.
This script will zip the logs directory and the database contents on the server. Also, this script is useful for
uploading the required data from a customer network for further analysis.
To execute the script, go to the
<installed directory>
on the server machine. Enter the command:
sudo ./NMS_info.sh
Executing the script to migrate the database
The NMS package includes a shell script for using the current development build on an earlier database. To
use this script, stop the NMS server but leave the MySQL server running.
To execute the script, go to the
<installed directory>/bin
on the server machine. Enter the command:
sudo dos2unix db_changes_1.27D.sh;sudo ./db_changes_1.27D.sh
Executing the script to back up card configurations
The NMS package includes a shell script for setting up automatic card configuration backups for cards man-
aged by the NMS. This script supports the following card types: 2616RC, 3096RC, 3196RC, and 6511RC.
Place the script file in the following location:
/opt/FS6300/pe_card_backup.pl
Configuration backup files are saved in the following location:
/opt/FS6300/card_cfg/[date of backup]/[ipad-
dress]-[date of backup]
Backup configurations for all cards in the NMS
To backup the card configuration files for all of the cards in the NMS, enter the command:
./pe_card_backup.pl DB
This command obtains a list of IP addresses of all cards managed in the NMS database. It also checks availabil-
ity of the backup location on the file system and creates the directory, if needed.
For each of the IP addresses, the script pings the card on the network. If the card is available, the script backs
up the configuration. If the card does not respond to the ping request, the script skips the card and moves on
to the next IP address in the list.
The script performs each card configuration backup sequentially and allows 5 minutes for completion. Imme-
diately after a successful card backup, the script sends a network ping to the next card and repeats the process.
If the backup does not complete in 5 minutes, the system purges the incomplete configuration for that particu-
lar card. Then, the system moves on to the next card.
Backup configuration for a specific card
To backup the card configuration files for a specific card in the NMS, enter the command:
./pe_card_backup.pl HOST 1.2.3.4
This script checks the availability of the backup location on the file system and creates the directory, if needed.
If the card is available, the script backs up the configuration. If the card does not respond to the ping request,
the script will not back up the configuration file. The script allows 5 minutes to complete the card backup. If
the backup does not complete in 5 minutes, the system purges the incomplete configuration for the card.