Daily Archives: Thursday, October 6, 2016

How can I Call Any .exe (or any program) Using Batch File Script 0

D.light -Run-EXE-File-Using-Batch-Script

Hi All,
You have to open notepad

Write  command in it

start /d “Path of File” FileName.exe

Now save the file as .bat extension.

If you double click on the file , your batch script will run and your desired program

will open.
Like,
start /d  “d:Software” putty.exe
putty program will open. See below screenshot.
You can make it schedule program using Windows Task Scheduler.
 
 
 
 
D.light -Run-EXE-File-Using-Batch-Script

Run_EXE_File_Using_Batch_Script


 

How To Backup and Restore Fully Automated Nagios(FAN Nagios) with Configuration and All. 3

Fully Automated Nagios
FAN Server Backup
The fan-backup script is available if you want backup your FAN server.

Install the fan-backup rpm :


# yum install fan-backup


To backup a FAN standonale, run

# /opt/fan_backup.pl -s

To get help, run :

# /opt/fan_backup.pl –help
FAN Server  Restore
To restore a backup files, run :

# cd /var/backup/XXXXXXXX_XXXXXX/

# rsync -ravcz centreon /etc
# rsync -ravcz nagvis /etc
# rsync -ravcz logos /usr/share/nagios/images/
# rsync -ravcz plugins /usr/lib/nagios/ # i386 arch or
# rsync -ravcz plugins /usr/lib64/nagios/ # x86_64 arch
# rsync -ravcz pages /var/www/dokuwiki/data/

To restore database :


# cd /var/backup/XXXXXXXX_XXXXXX/databases

# zcat centreon2/centreon2.sql.gz | mysql centreon2
# zcat centreon2_storage/centreon2_storage.sql.gz | mysql centreon2_storage
# zcat nagios/nagios.sql.gz | mysql nagios