Local backups - backup limit not working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
GldRush98
Posts: 259
Joined: Wed May 25, 2011 10:51 am
Location: Springfield, IL
Contact:

Local backups - backup limit not working

Post by GldRush98 »

This started happening with the XI 5.5.0 upgrade. .1 or .2 updates didn't fix it.
I have local backups made, and only keep 2. I've been having to go in and manually delete them every week.
xi backup settings 1.PNG
xi backup settings 2.PNG
Here's cmdsubsys.log showing a backup happening.

Code: Select all

.
PROCESSED 0 COMMANDS
PROCESSING COMMAND ID 11510...
PROCESS COMMAND: CMD=1117, DATA=a:2:{i:0;s:19:"nagiosxi.1532885401";i:1;s:24:"/store/backups/nagiosxi/";}
CMDLINE=sudo /usr/local/nagiosxi/scripts/backup_xi.sh -n nagiosxi.1532885401 -d /store/backups/nagiosxi
No entry for terminal type "unknown";
using dumb terminal settings.
Stopping nagios: .done.
Starting nagios: done.
Backing up NagiosQL...
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
Backing up Nagios Core...
tar: Removing leading `/' from member names
tar: /usr/local/nagios/var/rw/nagios.qh: socket ignored
tar: /usr/local/nagios/var/ndo.sock: socket ignored
tar: /usr/local/nagios/var: file changed as we read it
Backing up Nagios XI...
tar: Removing leading `/' from member names
PHP Warning:  Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/nagiosim/nagiosim.inc.php on line 491
.....tar: /usr/local/nagiosxi/var: file changed as we read it
........Backing up MRTG...
tar: Removing leading `/' from member names
.Backing up the SNMP trap interface configuration files...
Backing up NRDP...
tar: Removing leading `/' from member names
...Backing up Nagvis...
tar: Removing leading `/' from member names
.Backing up MySQL databases...
.Backing up PostgresQL databases...
Backing up cronjobs for Apache...
Backing up logrotate config files...
Backing up Apache config files...
Compressing backup...
........................
===============
BACKUP COMPLETE
===============
Backup stored in /store/backups/nagiosxi/nagiosxi.1532885401.tar.gz
OUTPUT=Backup stored in /store/backups/nagiosxi/nagiosxi.1532885401.tar.gz
RETURNCODE=0

PROCESSED 1 COMMANDS
................
Probably something simple, but I don't know what to check. Guide me in the right direction oh wise Nagios ones. :ugeek:
You do not have the required permissions to view the files attached to this post.
Prod XI: Debian 12 - Nagios XI 2026R1.2
Dev XI: Debian 12 - Nagios XI 2026R1.2
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Local backups - backup limit not working

Post by scottwilkerson »

We believe we found a bug.

unzip and replace the 2 files attach in
/usr/local/nagiosxi/html/includes/components/scheduledbackups/scheduledbackups.inc.php
/usr/local/nagiosxi/html/includes/utils-commands.inc.php

After this these should remove the old files on the next backup
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
GldRush98
Posts: 259
Joined: Wed May 25, 2011 10:51 am
Location: Springfield, IL
Contact:

Re: Local backups - backup limit not working

Post by GldRush98 »

Wellp, that indeed fixed it! Great :mrgreen:
Prod XI: Debian 12 - Nagios XI 2026R1.2
Dev XI: Debian 12 - Nagios XI 2026R1.2
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Local backups - backup limit not working

Post by scottwilkerson »

GldRush98 wrote:Wellp, that indeed fixed it! Great :mrgreen:
great locking
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked