Page 1 of 1

E A S Y question!

Posted: Tue Apr 01, 2014 4:51 pm
by benhank
fellas!
how do I change this script:

Code: Select all

/usr/local/nagiosxi/scripts/backup_xi.sh
so that it excludes the perfdata directory (I don't want to include the perfdata in my backup)? (and don't say "Google" spence...

Re: E A S Y question!

Posted: Tue Apr 01, 2014 4:55 pm
by tmcdonald
benhank wrote:(and don't say "Google" spence...
The Trevor will say it: Google!

http://stackoverflow.com/questions/9842 ... es-folders

You'll just need to exclude the directory you want. Are you looking to exclude the RRDs or the unprocessed perfdata?

Also, update your signature. Seeing 1.6 is making me uneasy.

Re: E A S Y question!

Posted: Tue Apr 01, 2014 4:56 pm
by abrist
Update yo' signature! R1.6?

Re: E A S Y question!

Posted: Tue Apr 01, 2014 4:56 pm
by slansing
I'd also recommend that you update your signature :)

Re: E A S Y question!

Posted: Tue Apr 01, 2014 4:56 pm
by sreinhardt
1.6? man time to update that nagios box!

Re: E A S Y question!

Posted: Tue Apr 01, 2014 5:09 pm
by benhank
alright alright sheesh....

its this one

Code: Select all

/usr/local/nagios/share/perfdata
it's 39 gigs over here!

Re: E A S Y question!

Posted: Tue Apr 01, 2014 5:13 pm
by abrist
In /usr/local/nagiosxi/scripts/backup-xi.sh, change line #84 from:

Code: Select all

tar czfps $mydir/nagios.tar.gz /usr/local/nagios
To:

Code: Select all

tar czfps $mydir/nagios.tar.gz tar --exclude='/usr/local/nagios/share/perfdata' /usr/local/nagios
That should help keep the size of the backup down. If you care about the perfdata, just tar it up every once in a while and overwrite the old perfdata tar.

Re: E A S Y question!

Posted: Tue Apr 01, 2014 5:16 pm
by benhank
THANKS!
Does my new sig make me look fat?

Lock er up fellas i is be all set!

Re: E A S Y question!

Posted: Wed Apr 02, 2014 9:56 am
by abrist
You really should think about moving to windows me for the personal touch or os/2 warp for the street cred.

Re: E A S Y question!

Posted: Fri Apr 04, 2014 11:54 am
by benhank
windowsme? we dont need no newfangled os's. next thing you know you will be telling me to bump my ram up to 4mb's, no sir we are good. lock er up fellas!