Page 1 of 1

space issue and want to delete some files

Posted: Mon Apr 26, 2021 9:50 am
by zaji_nms
Dear Expert

we facing space issue and want to remove some unnecessary files, plz help

there is four query, please answer all

as long as i know, we don't take any backup which showing here as d=directory, looks Nagios taking and i think not necessary we can remove.
plz advice we can delete/remove or not?

/store/backups/nagiosxi <<<<<< PWD
[Monitoring]# ll -ltr
total 8788896
drwxr-xr-x 4 nagios users 4096 Dec 31 2019 nagiosxi.1577787362
drwxr-xr-x 4 nagios users 4096 Dec 31 2019 nagiosxi.1577787602
drwxr-xr-x 4 nagios users 4096 Jun 25 2020 nagiosxi.1593050341
drwxr-xr-x 3 nagios users 4096 Jul 5 2020 nagiosxi.1593914341
drwxr-xr-x 7 nagios users 4096 Aug 25 2020 nagiosxi.1598320741
drwxr-xr-x 2 nagios users 4096 Sep 1 2020 nagiosxi.1598925541
drwxr-xr-x 7 nagios users 4096 Oct 25 2020 nagiosxi.1603591141
drwxr-xr-x 7 nagios users 4096 Feb 15 05:09 nagiosxi.1613354461
drwxr-xr-x 2 nagios users 4096 Apr 3 05:01 nagiosxi.1617415262
drwxr-xr-x 7 nagios users 4096 Apr 17 05:10 nagiosxi.1618624861

-rw-r--r-- 1 nagios nagios 3006666871 Apr 24 04:31 nagiosxi.1619227261.tar.gz
-rw-r--r-- 1 nagios nagios 3006211251 Apr 25 04:30 nagiosxi.1619313661.tar.gz
drwxr-xr-x 7 nagios users 4096 Apr 25 05:10 nagiosxi.1619316061
-rw-r--r-- 1 nagios nagios 2986867255 Apr 26 04:30 nagiosxi.1619400061.tar.gz

[Monitoring]# cd nagiosxi.1593050341
nagiosxi.1593050341]# ll -ltr
total 2643444
-rw-r--r-- 1 nagios users 901842 Jun 25 2020 nagiosql.tar.gz
-rw-r--r-- 1 nagios users 195 Jun 25 2020 nagiosql-etc.tar.gz
-rw-r--r-- 1 nagios users 2612283039 Jun 25 2020 nagios.tar.gz
-rw-r--r-- 1 nagios users 67063301 Jun 25 2020 nagiosxi.tar.gz
-rw-r--r-- 1 nagios users 2799967 Jun 25 2020 mrtg.cfg
drwxr-xr-x 2 nagios users 40960 Jun 25 2020 conf.d
-rw-r--r-- 1 nagios users 25567 Jun 25 2020 hosts
-rw-r--r-- 1 nagios users 20732817 Jun 25 2020 nrdp.tar.gz
-rw-r--r-- 1 nagios users 3004779 Jun 25 2020 nagvis.tar.gz
drwxr-xr-x 2 nagios users 4096 Jun 25 2020 mysql
[Monitoring] nagiosxi.1593050341]# cd ..
[Monitoring]# cd nagiosxi.1613354461
[Monitoring] nagiosxi.1613354461]# ll -ltr
total 2874180
-rw-r--r-- 1 nagios users 901842 Feb 15 05:01 nagiosql.tar.gz
-rw-r--r-- 1 nagios users 195 Feb 15 05:01 nagiosql-etc.tar.gz
-rw-r--r-- 1 nagios users 2847488514 Feb 15 05:09 nagios.tar.gz
-rw-r--r-- 1 nagios users 67980614 Feb 15 05:09 nagiosxi.tar.gz
-rw-r--r-- 1 nagios users 2948893 Feb 15 05:09 mrtg.cfg
drwxr-xr-x 2 nagios users 40960 Feb 15 05:09 conf.d
-rw-r--r-- 1 nagios users 26434 Feb 15 05:09 hosts
-rw-r--r-- 1 nagios users 20732817 Feb 15 05:09 nrdp.tar.gz
-rw-r--r-- 1 nagios users 3004779 Feb 15 05:09 nagvis.tar.gz
drwxr-xr-x 2 nagios users 4096 Feb 15 05:09 mysql
drwxr-xr-x 2 nagios users 4096 Feb 15 05:09 pgsql
drwxr-xr-x 2 nagios users 4096 Feb 15 05:09 logrotate
drwxr-xr-x 2 nagios users 4096 Feb 15 05:09 httpd
[Monitoring] nagiosxi.1613354461]#

our one of main Admin not working with us and want your advice if we can remove below files/sub-directory from /tmp
[Monitoring]#pwd
/tmp

drwxr-xr-x 62 root root 4096 May 19 2016 xiwizards_backup
drwxr-xr-x 10 root root 4096 May 19 2016 xidashlets_backup
drwxr-xr-x 67 root root 4096 May 19 2016 xicomponents_backup
drwxr-xr-x 7 201 201 4096 Feb 15 2012 vmware-tools-distrib
drwx------ 2 root root 4096 Dec 31 2019 vmware-root
drwxr-xr-x 2 root root 4096 Nov 22 2017 vmware-config1
drwxr-xr-x 2 root root 4096 Jun 16 2013 vmware-config0
drwxrwxrwx 11 1003 1001 4096 Feb 27 2015 rrdtool-1.4.4
drwxr-xr-x 6 root root 4096 Aug 27 2012 nrds
drwxr-xr-x 2 root root 4096 May 22 2018 nagvisshapes
drwxr-xr-x 9 root root 4096 May 19 2016 nagiosxi
drwxr-xr-x 9 root root 4096 Apr 10 2013 nagios-business-process-addon-0.9.6
drwxr-xr-x 13 5000 5000 4096 Aug 19 2012 mod_gearman-1.3.8
drwxr-x--- 2 root root 4096 Apr 16 2013 JLU-Log
-rw-r--r-- 1 root root 93199 Mar 6 2011 nagios-business-process-addon-0.9.6.tar.gz
-rw------- 1 root root 180625 Feb 27 2015 yum_save_tx-2015-02-27-10-36GevwnP.yumtx
-rw-r--r-- 1 root root 300304 Dec 23 2012 rrdtool-1.3.8-6.el6.x86_64.rpm
-rw-r--r-- 1 root root 312261 Aug 19 2012 mod_gearman-1.3.8.tar.gz
-rw-r--r-- 1 root root 52480000 Dec 2 2011 wmic_1.3.13_static_64bit.tar.gz
-rw-r--r-- 1 root root 19399968 Aug 27 2012 nrds.tar.gz
-rw-r--r-- 1 root root 50908670 Apr 6 2016 xi-latest.tar.gz
-r--r--r-- 1 nuser nuser 64678021 Nov 22 2017 VMwareTools-8.6.5-621624.tar.gz

FYI, as long i know, we not using any GEARMAN, if u will ask will provide some more info

already deleted some log files from /var/log but still there are some
drwxr-xr-x 2 nagios root 4096 Dec 23 2012 mod_gearman
drwxr-xr-x 2 root root 4096 Apr 16 2013 puredisk
drwxr-xr-x 2 root root 4096 Jan 16 2014 atop
drwxr-xr-x 2 ntp ntp 4096 Dec 20 2014 ntpstats
drwxr-xr-x 2 root root 4096 May 21 2015 ConsoleKit

if you have better idea, plz share

regards

Re: space issue and want to delete some files

Posted: Mon Apr 26, 2021 4:09 pm
by gsmith
Hi,

1)First and foremost: backup all the volumes on your server

2)Once you have completed your backup you can delete what you are comfortable with in /store/backups/nagiosxi. I advise
keeping the last 3 backups at a minimum. They should be saved in the *.tar.gz format to save space. That number that is in the
file or directory name is the Unix timestamp. You can decode it using a site like https://www.unixtimestamp.com/index.php

3)Everything in /tmp can be deleted, but you should only do it when Nagios xi isn't running.

Once you do the above 3 items let's see how much room you have. Go to "/" and execute:

Code: Select all

du -h -d 1
It'll come back with something like this:

Code: Select all

[root@gs-cent8-23-82 /]# du -h -d 1
143M    ./boot
0       ./dev
du: cannot access './proc/113573/task/113573/fd/4': No such file or directory
du: cannot access './proc/113573/task/113573/fdinfo/4': No such file or directory
du: cannot access './proc/113573/fd/3': No such file or directory
du: cannot access './proc/113573/fdinfo/3': No such file or directory
0       ./proc
41M     ./run
0       ./sys
25M     ./etc
70M     ./root
609M    ./var
3.2G    ./usr
12K     ./home
0       ./media
0       ./mnt
0       ./opt
0       ./srv
457M    ./tmp
0       ./store
4.5G    .
From there we can continue to drill down to find things to delete.

Thanks

Re: space issue and want to delete some files

Posted: Tue Apr 27, 2021 1:07 pm
by zaji_nms
Thanks GSmith

upon your point 2) , i have deleted RED COLOR files in this my first thread and now i think will give me relax till end of this year (hope so) but one question, why NAGIOSxi creating this Files (Directory?) when there is already file created .tar.gz ?

I just kept three , but why this getting created by NAGIOSxi , what is purpose or its DUPLICATE process doing this mischief ?
drwxr-xr-x 2 nagios users 4096 Apr 3 05:01 nagiosxi.1617415262
drwxr-xr-x 7 nagios users 4096 Apr 17 05:10 nagiosxi.1618624861
drwxr-xr-x 7 nagios users 4096 Apr 25 05:10 nagiosxi.1619316061


can you please let me know in general this green file is more than enough if something went wrong with nagiosxi and have to restore with any good file, if YES then same above question why above RED color DIRECTORY getting created and consuming to much space / time and process and .....
-rw-r--r-- 1 nagios nagios 3006211251 Apr 25 04:30 nagiosxi.1619313661.tar.gz
-rw-r--r-- 1 nagios nagios 2986867255 Apr 26 04:30 nagiosxi.1619400061.tar.gz
-rw-r--r-- 1 nagios nagios 2822427761 Apr 27 04:29 nagiosxi.1619486461.tar.gz


Thank for good advice to SHUT NAGIOSxi then remove ./tmp Files.

regards

Re: space issue and want to delete some files

Posted: Tue Apr 27, 2021 4:23 pm
by dchurch
The directories in red have different time stamps, and are thus different backup operations.

Perhaps there is a bug that causes the backup process to not clean up after itself, but did you have some backups fail recently, possibly due to lack of disk space on the backup volume?

Re: space issue and want to delete some files

Posted: Wed Apr 28, 2021 3:02 pm
by zaji_nms
Dear dchurch

how to know backup done successfully or not? i dont have any idea to know it. plz guide.

if you see RED and GREEN , both on same date/time (nearly)... may be there is some DUPLICATE process but i found its very very random. Please make sure there is no bug in your latest release, if there is please remove.

drwxr-xr-x 7 nagios users 4096 Apr 25 05:10 nagiosxi.1619316061
-rw-r--r-- 1 nagios nagios 3006211251 Apr 25 04:30 nagiosxi.1619313661.tar.gz

my one of question not answered, can you please let me know if below pattern file is enough to take backup and require to restore in case of any disaster, then safe to delete any other file(s).

nagiosxi.xxxxxxxxxx.tar.gz

regards

Re: space issue and want to delete some files

Posted: Wed Apr 28, 2021 4:05 pm
by dchurch
You can test your backup archive's integrity by running "tar tf nagiosxi.1619313661.tar.gz" - if it exits with an error, then the tarball is incomplete.

As far as the bug goes, I can submit a bug report on your behalf if you'd like. Please keep in mind that the decision to implement the enhancement is at the discretion of our development team.

And yes, that pattern will work for your purposes, at least until Nov 20, 2289 when you'll have to add another "x"