Skip to content

Commit

Permalink
Improve output of nems-restore, finalize 1.5 DB defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
NEMS Linux committed Nov 19, 2018
1 parent a9848bd commit 03dd006
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nems-push-db.sh
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions nems-restore-sample-db.sh
@@ -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.