|
Maintenance And Disaster Recovery
11.1 BVE Database Maintenance
The provisioning server stores all the configuration information in an Object Oriented database called Poet FastObjects, while the DGE components use a relational database such as MySQL, Oracle, etc. These databases need to be backed up periodically as a safety measure, as it will allow you to fall back to the last backed up version in the event of a database corruption. In normal operating mode, the Poet database may have objects in memory and writing data to the database files randomly. It is not recommended that the database files be backed up while Poet is writing to the databases.
NetVigil comes with a backup utility that should be used to backup the BVE database in proper manner. The script sends special signals to the Poet database to flush all in-memory objects to disk and allows an external backup program to copy the database files. Once the backup operation has been completed, the script sends signal to Poet to resume normal operation. While the backup operation is in progress, Poet will continue to operate normally and cache all write transactions.
On Unix platforms, the backup utility is run from the NetVigil cron job (
NETVIGIL_HOME/utils/runPeriodicTasks.pl) nightly (see "Scheduled tasks (cron jobs)" on page 25). By default these backup utilities create a tar-gzipped archive in the/var/backupdirectory with names of the formnetvigil-mm-dd-yy,hh-mm.tar.gz. If you would like to create these files somewhere else, edit the01d_50_db_backup.shscript to specify the destination by changing thebackupPathvariable. (Whether you use the default or some other location, make sure that there is sufficient disk space for the backup files.)While NetVigil is running:
Use
db_backup.cmdon Windows platforms instead.You can also export the provisioning database into XML using:
In order to restore a copy of the provisioning database, simply uncompress and un-tar the archive into the
NETVIGIL_HOMEdirectory. You must stop NetVigil before restoring the database.% /etc/init.d/netvigil stop % cd NETVIGIL_HOME % cd database % mv provisioning provisioning.OLD % mv provisioningdict provisioningdict.old % cd .. % gunzip -c /var/backup/netvigil-mm-dd-yy,hh-mm.tar.gz | tar xvf - database/provisioning database/provisioningdict % /etc/init.d/netvigil startIn order to repair a corrupted provisioning database, use the following commands. You should consult with Fidelia support before using these commands:
cd "\Program Files\Fidelia Netvigil" poet\bin\ptadmin -check database\provisioning poet\bin\ptadmin -reorg database\provisioningIf you get any errors, then you should contact Fidelia support before attempting to restart NetVigil.
11.2 DGE database Maintenance
The DGE database is located in the directory
database/mysql/aggregateddatadbwith the extension ".MYD." NetVigil comes with a utility to create a fast snapshot of the DGE database by locking all the databases and then saving the raw databases directly.
cd NETVIGIL
utils/db_backup.shOn Windows, use the db_backup.cmd command instead.
If you want to change the location of the backups, you must edit the db_backup.sh script.
% cd NETVIGIL_HOME % etc/netvigil.init stop % cd database % mv aggregateddatadb aggregateddatadb.OLD % tar xf /var/backup/netvigil-mm-dd.tar aggregateddatadb % cd NETVIGIL_HOME % utils/db_repair.sh # to do a consistency check % etc/netvigil.init startTo repair the DGE database indexes, shutdown NetVigil first. Then run the following command to rebuild the indexes:
This will use the
myisamchkcommand to rebuild the indexes. If you do not have enough disk space to rebuild the database, edit the db_repair.sh file and uncomment the"-o"option instead of the "-r" option.If you are moving the database between platforms, you will need to export the database into a SQL file using the following commands:
bin/mysqldump --defaults-file=NETVIGIL_HOME/etc/mysql.conf --opt aggregateddatadb > /var/backup/backup-db.sqlAdditional information on backing up MySQL databases can be obtained from the following URLs:
http://www.mysql.com/doc/en/mysqldump.html
http://www.mysql.com/doc/en/Backup.htmlTo import the database back into MySQL, use the following commands:
% /etc/init.d/netvigil.init stop % cd /tmp % gunzip -c /var/backup/netvigil-mm-dd-yy,hh-mm.tar.gz | tar xvf - aggregateddatadb.sql % cd NETVIGIL_HOME % cd database % mv aggregateddatadb aggregateddatadb.OLD % cd ../mysql/bin % mysql --defaults-file=../../etc/mysql.conf aggregateddatadb < /tmp/aggregateddatadb.sql % rm /tmp/aggregateddatadb.sql % /etc/init.d/netvigil.init start11.2.1 Optimizing the DGE Database
You can rebuild the indexes and also run optimize. This command should only be run if you are experiencing slowness and Fidelia Support has advised you to run this command:
11.3 Transferring NetVigil to Another Platform
The following description is for transferring an existing copy of NetVigil from a Unix platform to a Windows platform.
- Install a fresh copy of NetVigil on the Windows servers. Make sure that the Windows host has been restarted after the installation is complete. Once the server is back online, shutdown NetVigil (which will start automatically) using the Service Controller. The same needs to be done on the Linux host using "etc/netvigil.init stop".
- Export the provisioning database from Linux host using following commands (substitute proper path names):
sh> cd /usr/local/netvigil/poet/bin sh> LD_LIBRARY_PATH=/usr/local/netvigil/poet/lib sh> export LD_LIBRARY_PATH sh> ./ptxml -export -file /tmp/provdb.xml\ -base ../../database/provisioningOnce the command completes, copy "/tmp/provdb.xml" to a temporary location on the Windows host
c: cd "\Program Files\Fidelia Netvigil" utils\databaseUtil.pl --action import \ --file \path\to\provdb.xmlWhen asked if you want to "proceed with this operation", answer "y" (w/o the quotes). The command may take a few minutes depending on how many objects were configured in the database from the Linux host
Steps 2 and 3 are only applicable for migrating the host that is running BVE/Web Application. Likewise, step 4is only for the DGE host.
11.4 Password Recovery
Open command prompt and execute the following commands, substituting correct drive letter and path as necessary:
This should create a file named "provdb.xml" which can be edited to reset the password. Search for the "superuser" entry and remove the entire "crypt" prefix along with the encrypted password. Replace this with a cleartext password (with no crypt prefix).
<loginName code="Ansi" lang="en">superuser</loginName> [...] <password code="Ansi" lang="en">{crypt}xyzabc</password>Then import the edited file back into the database using:
Answer Y when prompted if you wish to replace the existing database. Then restart NetVigil.
11.5 Expire Messages From Message Window
You can "expire" messages in bulk via the MySQL client manually. First, open the message windows and record the "Device Address" for the device in question. Then log into each NetVigil host and execute the following commands:
cd/opt/netvigil etc/dgedb.init admin dge (at `mysql>' prompt) update alarms set expireTime = 1081262436203 where deviceAddress = `n.n.n.n' and expireTime = -1; \qwhere n.n.n.n is the IP address noted above. Once the database table has been updated, the messages should no longer show up on the message window.
11.6 Changing IP Address of BVE
Since the Provisioning Database stores all device and test parameters, aggregation scheme, test schedules, action profiles, etc. the DGE component needs to know what the IP address of the host is where the Provisioning Database is running. Likewise, since the database contains information on user accounts, various limits and permissions, service definitions, etc. the Web Application component also needs to communicate with the Provisioning Database on a regular basis.
Locate the following section:
<provisioning name="provisioning"
host="n.n.n.n"
[....]and change the old IP address n.n.n.n to the new IP address of the BVE.
Also configure the JMS server by updating the IP address in the following section of the above file:
<jms host="n.n.n.n"
[....]Locate and update the IP address in the following section of this file:
<ServerConfiguration host="n.n.n.n" embeddedJNDI="true" />Once the configuration files have been updated, restart NetVigil components on all hosts, starting with the Provisioning Database host first to apply the change.
|
Fidelia Technology, Inc. NetVigil v4.0 www.fidelia.com |