Page 2 of 2

Re: Nagios not deleting old backups

Posted: Tue May 02, 2017 9:26 am
by emartine
SteveBeauchemin wrote:I had a similar situation a short while ago.

On the remote system where the tar.gz files are landing, can you extract the data? Basically, is the tar file complete and okay?

Mine were not. It turn out with my site that I had a large amount of Perf files to tar up. It took too long, and the system tried to move the tar file to the remote host before it was actually ready.

I needed to add some variable to one of my php files to fix it. Once that was done, the tar files on the remote server were complete and I could extract them.

This may not be your situation, but if your remote backup files will not extract, you may want to make this change.
https://support.nagios.com/forum/viewto ... 16&t=42075

Good luck... I'll be watching this for answers too.

Thanks

Steve B


This doesn't seem to be the case with my system. The backups on the remote host extract fine. Same for the local host.

Re: Nagios not deleting old backups

Posted: Tue May 02, 2017 9:36 am
by dwhitfield
@emartine, did you have a chance to look at @ssax's solution, deleting the old backups?

Re: Nagios not deleting old backups

Posted: Tue May 02, 2017 1:50 pm
by emartine
dwhitfield wrote:@emartine, did you have a chance to look at @ssax's solution, deleting the old backups?

Yes I've tried that. I'll reply to his message.

Re: Nagios not deleting old backups

Posted: Tue May 02, 2017 1:51 pm
by emartine
ssax wrote:Please run these commands and see if the issue is resolved when it runs as scheduled:

Code: Select all

mkdir /usr/local/backups/OLD
mv /usr/local/backups/* OLD/
You may want to delete what you don't need to free up space from this directory so that the backup scripts have enough room to work:

Code: Select all

mkdir /usr/local/backups/OLD
I believe this may fix the problem (I saw this exact issue before) but we'll have to wait and see.

Thank you
I deleted a lot of old backups (over 700G worth) last night and left only the last 7 assuming that it would pick that up since I was requesting only 7 and purge that the backup would purge the extra as appropriate. But this is not the case since last night it created an 8th file. I have deleted them all from the backup directory.

Re: Nagios not deleting old backups

Posted: Tue May 02, 2017 1:59 pm
by dwhitfield
If in a week it still isn't deleting, please send the new /usr/local/nagiosxi/var/components/scheduledbackups.log

Re: Nagios not deleting old backups

Posted: Fri Jul 07, 2017 11:50 am
by emartine
Please feel free to close this. All is working as expected regarding the backups.

Re: Nagios not deleting old backups

Posted: Fri Jul 07, 2017 12:01 pm
by scottwilkerson
Glad to here it's resolved emartine!