script for sync main with backup server

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

script for sync main with backup server

Post by fsodah »

Do you have a script to update the backup server every week with main... taking the backup and stop Nagios on the backup server and restore the latest image of the config ... since am doing it now manually.
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: script for sync main with backup server

Post by vtrac »

Hi fsodah,
I'm sorry we do not have the script to update the backup server every week with main.

However, you can setup the weekly SSH backup and store the backup "*.tar.gz" file onto your replica server.
You can also use "rsync" to do that if you like.

Once the ".tar.gz" file is on the replica server, you can setup a cron job that will calls the below command:

Code: Select all

/usr/local/nagiosxi/scripts/restore_xi.sh `find /store/backups/nagiosxi/ -name "*.tar.gz" -type f | xargs ls -tr | tail -1`
Regards,
Vinh
fsodah
Posts: 295
Joined: Thu Sep 12, 2019 1:19 am

Re: script for sync main with backup server

Post by fsodah »

Done ... please close the above ticket
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: script for sync main with backup server

Post by scottwilkerson »

fsodah wrote:Done ... please close the above ticket
Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked