simplest way to move data

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

simplest way to move data

Post by benhank »

My LS cluster is moving to new hardware.
whats the simplest way to move the data from the old cluster to the new ?
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
User avatar
kfanselow
Posts: 241
Joined: Tue Aug 31, 2021 3:25 pm

Re: simplest way to move data

Post by kfanselow »

Probably the easiest route to migrate the logdata would be to create a snapshot and restore the data to the new server.

Configure (top) -> Configure Snapshots (left) - and then create a new snapshot which can be found in the directory:

Code: Select all

/usr/local/nagioslogserver/snapshot
Copy the snapshot file to your new system to the new system and restore.

If you need to migrate the configuration information as well you can use the system backups which can be found here:

Code: Select all

/store/backups/nagioslogserver/
More information about Backing Up And Restoring Nagios Log Server can be found here:
https://assets.nagios.com/downloads/nag ... Server.pdf

More information about Managing Snapshots can be found here:
https://assets.nagios.com/downloads/nag ... enance.pdf

Thanks and Best Regards,
Keith
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: simplest way to move data

Post by benhank »

thank you!
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
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: simplest way to move data

Post by benjaminsmith »

Hi Ben,

Glad that was helpful. Did you have any other questions or shall we mark this as resolved?

Let us know when you have a chance.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: simplest way to move data

Post by benhank »

I do have one more question:
I want to use rsync to copy the data from the old cluster to the new cluster and get5 the data working on the new.
How would I do that?
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
User avatar
kfanselow
Posts: 241
Joined: Tue Aug 31, 2021 3:25 pm

Re: simplest way to move data

Post by kfanselow »

Hi benhank,

If you're looking to move the snapshot data between the machines here is the manual page for rysnc, however I think it might be easier just to scp it between the two hosts.

https://www.freebsd.org/cgi/man.cgi?que ... ormat=html

However If you are trying to sync the elasticsearch data while it's running I'm not sure if or how that can be done; please let us know if you can find a way - we'd love to hear about it.

Thanks and Best Regards,
Keith
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: simplest way to move data

Post by benhank »

So far here is what I have done:
on old cluster :

1. shutdown Elasticsearch on node 2 of the old cluster. (this node does not ingest data)

Code: Select all

 systemctl stop elasticsearch.service
2. I have a single node test NLS server which is not ingesting data so I shut down elasticsearch on it:

Code: Select all

 systemctl stop elasticsearch.service
then I copied the data from the old to the test server:

Code: Select all

 rsync -avzhe ssh benhanker@lNLSp01:/usr/local/nagioslogserver/elasticsearch/data/c9dc126e-346d-4bfa-a30e-14b849c50ab5 /scratch/nlsdata/
and started the service:

Code: Select all

systemctl start elasticsearch.service
The old cluster has 180 days of data but after copying the files I don't see it.
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
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: simplest way to move data

Post by ssax »

Everywhere I've found says that what you're trying to do will have issues because of the way it is stored and the cluster being different.

The recommendation would be to use snapshots and then restore them on the new cluster as moving the data from the old system is an unsupported process (that is what the snapshots are for).
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: simplest way to move data

Post by benhank »

ok you can lock it up and thanks!
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
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: simplest way to move data

Post by benjaminsmith »

Hi Ben,
ok you can lock it up and thanks!
Sounds good. If you need help with anything else, feel free to reach out.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked