hey fellas!
i need to figure export Nagios's DB and restore it to another. I saw documentation that detailed this a while ago, but cant find it now. I'm trying to do this on 2014 version.
Manually restore the nagios(xi)db(s)
Manually restore the nagios(xi)db(s)
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
Re: Manually restore the nagios(xi)db(s)
Just to make sure, do you know if the server is actually utilizing MySQL? I believe 2014 still used Postgres.
Former Nagios Employee
Re: Manually restore the nagios(xi)db(s)
Yeah I think it uses both
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
Re: Manually restore the nagios(xi)db(s)
To backup MySQL to file:
To restore MySQL from file:
To backup PostgreSQL to file:
To restore PostgreSQL from file:
Code: Select all
mysqldump -uroot -pnagiosxi --add-drop-database nagios > /tmp/nagios_export.sql
mysqldump -uroot -pnagiosxi --add-drop-database nagiosql > /tmp/nagiosql_export.sqlCode: Select all
mysql -uroot -pnagiosxi nagios < /tmp/nagios_export.sql
mysql -uroot -pnagiosxi nagiosql < /tmp/nagiosql_export.sqlCode: Select all
pg_dump -c -U nagiosxi nagiosxi > /tmp/nagiosxi_export.sqlCode: Select all
psql nagiosxi nagiosxi < /tmp/nagiosxi_export.sqlRe: Manually restore the nagios(xi)db(s)
ok thanks ! dont lock it till I test ok?
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
Re: Manually restore the nagios(xi)db(s)
ok cool the export worked thanks guys!
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion