Permalink
Browse files

Improve output of nems-restore, finalize 1.5 DB defaults

  • Loading branch information...
NEMS Linux
NEMS Linux committed Nov 19, 2018
1 parent a9848bd commit 03dd0061cc045a2d68f49e0dca34b6e533895fe5
Showing with 9 additions and 2 deletions.
  1. +2 −2 nems-push-db.sh
  2. +7 −0 nems-restore-sample-db.sh
@@ -64,12 +64,12 @@ mysql -u nconf -pnagiosadmin nconf -e "DELETE FROM ConfigValues WHERE fk_id_attr
mysql -u nconf -pnagiosadmin nconf -e "DELETE FROM ConfigValues WHERE fk_id_attr=60;" # services
mysql -u nconf -pnagiosadmin nconf -e "DELETE FROM ConfigValues WHERE fk_id_attr=182;" # advanced-services
mysql -u nconf -pnagiosadmin nconf -e "DELETE FROM ConfigValues WHERE fk_id_attr=70;" # servicegroups
mysql -u nconf -pnagiosadmin nconf -e "DELETE FROM ConfigValues WHERE fk_id_attr=12;" # OS's
#mysql -u nconf -pnagiosadmin nconf -e "DELETE FROM ConfigValues WHERE fk_id_attr=12;" # OS's
mysql -u nconf -pnagiosadmin nconf -e "DELETE FROM ConfigValues WHERE fk_id_attr=57;" # contactgroups
mysql -u nconf -pnagiosadmin nconf -e "DELETE FROM ConfigValues WHERE fk_id_attr=30;" # checkcommands
mysql -u nconf -pnagiosadmin nconf -e "DELETE FROM ConfigValues WHERE fk_id_attr=98;" # misccommands
mysql -u nconf -pnagiosadmin nconf -e "DELETE FROM ConfigValues WHERE fk_id_attr=32;" # timeperiods
mysql -u nconf -pnagiosadmin nconf -e "DELETE FROM ConfigValues WHERE fk_id_attr=73;" # host-presets
#mysql -u nconf -pnagiosadmin nconf -e "DELETE FROM ConfigValues WHERE fk_id_attr=73;" # host-presets
mysql -u nconf -pnagiosadmin nconf -e "DELETE FROM ConfigValues WHERE fk_id_attr=108;" # host-templates
mysql -u nconf -pnagiosadmin nconf -e "DELETE FROM ConfigValues WHERE fk_id_attr=129;" # service-templates
@@ -0,0 +1,7 @@
#!/bin/bash
systemctl stop mysql
rm -rf /var/lib/mysql
cp -R /root/nems/nems-migrator/data/`/usr/local/bin/nems-info nemsbranch`/mysql/NEMS-Sample /var/lib/
chown -R mysql:mysql /var/lib/NEMS-Sample
mv /var/lib/NEMS-Sample /var/lib/mysql
systemctl start mysql

0 comments on commit 03dd006

Please sign in to comment.