Home > BashScripts, HowTo, Linux, Nagios > Backup nagios

Backup nagios

October 21st, 2008 Leave a comment Go to comments

.
.
Nagios/Linux easy backup method
No backup tapes, no FTP. Just simple, mount a remote share and put files there.
The important part is to mount the share when the system starts up, so we
will could also edit the /etc/fstab file. But before editing make sure to try the mount
commands to make sure they work. I konw old kernels did not support smbfs or cifs,
and in that case maybe best to just use old FTP. I choose to mount and then
unmount when done.

vim backuptoshare.sh


mount -t cifs -o username=linuxbackup,password=caca3 //10.10.10.22/bck_linux /mnt/backupshare
/bin/tar -cvvzf /mnt/backupshare/nagios_plugins.tar /usr/local/nagios/libexec
/bin/tar -cvvzf /mnt/backupshare/nagios_cfg.tar /usr/local/nagios/etc
sync
umount //10.10.10.122/bck_linux_oasis

Also note that you should be backing up the MySQL DBs I have also wrote a script for that, it is here.

VAMOVE *

*