Page 1 of 1

REQUEST: Backup script

Posted: Fri Sep 23, 2011 9:29 am
by cwscribner
Hi all.

I wanted to make a request for a backup script. Preferably something that I can invoke once and send to the background then go about my other technical duties. It'd also be nice if the backup script treated itself like a transaction so any errors would cause it to stop and undo and temporary changes its made.

Additional Thought: It would be supremely ideal if I could upgrade Nagios XI by just clicking an "Upgrade" button in the interface then get an ETA and progress bar.

Re: REQUEST: Backup script

Posted: Fri Sep 23, 2011 9:35 am
by agriffin
There are already backup scripts included with XI found at /usr/local/nagiosxi/scripts/backup_xi.sh & /usr/local/nagiosxi/scripts/restore_xi.sh. They will back up to and restore from the directory /store/backups/nagiosxi. There is some documentation here.

Re: REQUEST: Backup script

Posted: Fri Sep 23, 2011 10:20 am
by cwscribner
Just realized my typo. I meant to make a request for a full upgrade script. One that would be invoked once and handle all the backups, service manipulation, downloads, etc.

Re: REQUEST: Backup script

Posted: Fri Sep 23, 2011 1:57 pm
by agriffin
I've whipped up a quick script for this purpose and attached it to this post. It's simple right now, and if a step fails it does not try to undo any damage (although it also won't try to blindly keep continuing even if commands fail).

We can't handle the entire upgrade process from the web interface because it requires root permissions, but I'll look into streamlining the upgrade process with a script like this.

Re: REQUEST: Backup script

Posted: Fri Sep 23, 2011 2:20 pm
by cwscribner
Thanks! Much appreciated.