This post explains the steps involved to clean up the NSM database
Cleaning up your NSM database is very important in order to keep it fast :-} I know how painfull it will be to work when your NSM is slow. Perform this DB maintenance when your DB size is about 1.6 GB this figure may vary depending upon the actual size of the database.
You need to do the DB maintenance only on the Primary GUI Server in case if you have a clustered environment.
1. Login to NSM gui Server through ssh
2. Login using sudo su - nsm
3. Verify the NSM Database size
[root@nsm-gui-1a ~]# cd /var/netscreen/GuiSvr/xdb/
[root@nsm-gui-1a xdb]# du -skh * | sort -n
2.8G data
8.0K tmp
18M log
96K specs
475M xdb8598.tar.gz
476M init
4. Check the size of the data directory and note the same.
5. Verify the status of the Gui server in the secondary server
# /etc/init.d/guiSvr status
(If all the services are showing off, this confirm it is secondary server)
6. Shut down secondary GuiSvr (if in a cluster)
# /etc/init.d/haSvr stop
7. Shut down primary GuiSvr
# /etc/init.d/haSvr stop
8. Make a backup of the /var/netscreen/GuiSvr-directory
# cd /var/netscreen
# tar -pzcvf /var/tmp/backup_todays-date
9. Export Audit-logs to csv format.
# /usr/netscreen/GuiSvr/utils/xdbAuditLogConverter.sh /usr/netscreen/GuiSvr/var/xdb/ csv /opt/nsmbackup/auditlog-todays-date
10. Export configuration to Xdif
# . /usr/netscreen/GuiSvr/utils/xdbExporter.sh /var/netscreen/GuiSvr/xdb/ /opt/nsmbackup/backup_todays-date
After this activity, it will log you out, so Login back again using sudo su – nsm
11. Import configuration from Xdif – This will import only the active objects.
#. /usr/netscreen/GuiSvr/utils/xdifImporter.sh /opt/nsmbackup/backup_todays-date
After this activity, it will log you out, so Login back again using sudo su – nsm
12. Remove audit logs and job information
# rm /var/netscreen/GuiSvr/xdb/init/auditlog.init
# rm /var/netscreen/GuiSvr/xdb/init/auditlogDetails.init
# rm /var/netscreen/GuiSvr/xdb/data/auditlog
# rm /var/netscreen/GuiSvr/xdb/data/auditlogDetails
# mv /var/netscreen/GuiSvr/xdb/init/directive.init /opt/nsmbackup/directive.init.
# rm /var/netscreen/GuiSvr/xdb/data/directive
# rm /var/netscreen/GuiSvr/xdb/data/policylookup
# mv /var/netscreen/GuiSvr/xdb/init/policylookup.init /opt/nsmbackup/policylookup.init.
# gzip /opt/nsmbackup/backup_todays-date
13. Start the primary GUI server and check the status.
# /etc/init.d/haSvr start
# /etc/init.d/haSvr status
# /etc/init.d/guiSvr status
14. Once the Primary GUI Server is up then start the secondary GUI server as well and check the status of the cluster.
# /etc/init.d/haSvr start
# /etc/init.d/haSvr status
# /etc/init.d/guiSvr status
15. Check the current size of the NSM data directory in the primary GUI server.
[root@nsm-gui-1a ~]# cd /var/netscreen/GuiSvr/xdb/
[root@nsm-gui-1a xdb]# du -skh * | sort -n
1.2G data
8.0K tmp
18M log
96K specs
475M xdb8598.tar.gz
476M init
[root@nsm-gui-1a xdb]#
Leave your comment below |
No comments:
Post a Comment