Nagios backups file size =biggun's

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Nagios backups file size =biggun's

Post by benhank »

Hello all.
When I run

Code: Select all

/usr/local/nagiosxi/scripts/backup_xi.sh script
I run out of space on teh root dir.
I have modified the files to be backed up and added a few directories, but they aren't big. I tried to change the default backup folder to

Code: Select all

/home/store/backups/
, which runs fine. I changed the default dir in

Code: Select all

/usr/local/nagiosxi/scripts/restore_xi.sh
to

Code: Select all

/home/store/backups/
to but then when I run it fails because the restore script can find the file in

Code: Select all

/store/backups/nagiosxi
.

So, is there another line or something i need to modify, or is there a way to increase the size of the root "/" not "/root"directory on my machine?
I attached the two files that create the backup that causes the disk space error.
Thanks in advance.
ps. I woulda cracked a coupla jokes, but i am dog tired.
You do not have the required permissions to view the files attached to this post.
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios backups file size =biggun's

Post by abrist »

XI backups include the rrds, databases, configs, logs. Think about that for a moment, specifically the rrds. Depending on the number of checks, they may use gigs, if not 10s of gigs in the largest of installs. Logs can also get crazy big. You will probably need to increase the volume size, or backup to an external location (as you were trying). If you are running a vm, you can increase the volume size by following the document below:
http://assets.nagios.com/downloads/nagi ... M_Disk.pdf
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: Nagios backups file size =biggun's

Post by benhank »

All righty bro! Thanks!
On a side note, the restore_xi.sh script does not restore plugins. Is there a reason for that? I mean is backing up the plugins problematic? I wanna know because I want to add the plugins to that backup_xi.sh script.

Sorry man, one more is it possible to increase the size of "/"? right now its using 50gb on a 500gb drive ....I was stupid back then when I set up the server...
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios backups file size =biggun's

Post by abrist »

So I assume this is not a virtual machine?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios backups file size =biggun's

Post by tmcdonald »

benhank wrote:On a side note, the restore_xi.sh script does not restore plugins. Is there a reason for that? I mean is backing up the plugins problematic? I wanna know because I want to add the plugins to that backup_xi.sh script.
Shouldn't hurt anything. Could be that when we wrote the script it was assumed that stock plugins would be used and nothing needs to be backed up.
benhank wrote:Sorry man, one more is it possible to increase the size of "/"? right now its using 50gb on a 500gb drive
Probably just fdisk it if a physical machine. If virtual: http://assets.nagios.com/downloads/nagi ... M_Disk.pdf
benhank wrote:....I was stupid back then when I set up the server...
So was I, bro. So was I...
Former Nagios employee
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: Nagios backups file size =biggun's

Post by benhank »

no not a vm. vm's are for ppl who plan properly...
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios backups file size =biggun's

Post by abrist »

Are you using LVM?

Code: Select all

fdisk -l
df -h
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: Nagios backups file size =biggun's

Post by benhank »

yes:

Code: Select all

[root@lkennagiost01 ~]# fdisk -l

Disk /dev/sda: 293.5 GB, 293496628224 bytes
255 heads, 63 sectors/track, 35682 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000dbfb7

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64       35683   286104576   8e  Linux LVM

Disk /dev/sdb: 500.1 GB, 500074307584 bytes
255 heads, 63 sectors/track, 60797 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00050cbe

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       60798   488352768   8e  Linux LVM

Disk /dev/sdc: 500.1 GB, 500074307584 bytes
255 heads, 63 sectors/track, 60797 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001f125

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1       60798   488352768   8e  Linux LVM

Disk /dev/sdd: 500.1 GB, 500074307584 bytes
255 heads, 63 sectors/track, 60797 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e106f

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1       60798   488352768   8e  Linux LVM

Disk /dev/mapper/vg_lkennagiost01-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_lkennagiost01-lv_swap: 19.0 GB, 19008585728 bytes
255 heads, 63 sectors/track, 2310 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_lkennagiost01-lv_home: 1720.5 GB, 1720482529280 bytes
255 heads, 63 sectors/track, 209170 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

[root@lkennagiost01 ~]# df -h
Filesystem                            Size  Used Avail Use% Mounted on
/dev/mapper/vg_lkennagiost01-lv_root   50G   40G  7.6G  84% /
tmpfs                                 7.8G   12K  7.8G   1% /dev/shm
/dev/sda1                             485M  144M  317M  32% /boot
/dev/mapper/vg_lkennagiost01-lv_home  1.6T  1.1G  1.5T   1% /home
[root@lkennagiost01 ~]#
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios backups file size =biggun's

Post by abrist »

Alright, and it looks like you have a giant, unused /home partition. We will have to decrease that as well. This is real sticky business. If it7 is messed up, there is no recover path. Do a full rsync or system back up before trying to do this. I would be partial to helping through a remote session once you have taken the absolutely necessary precautions.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: Nagios backups file size =biggun's

Post by benhank »

ok Ill get a backup. on a side side note, you have a doc that shows how to use rysinc 4 this? I have googled it, but the replies have me googled.. :shock: if not dont sweat it ill let you know when I ha backup and tested it.
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
Locked