adminbd

Записи по mssql,oracle,windows и linux

Have a Question?

If you have any question you can ask below or enter what you are looking for!

Резервное копирование PRTG. Копирование PRTG Configuration.dat

Бэкап конфигурации PRTG. Файл с настройками PRTG лежит C:\ProgramData\Paessler\PRTG Network Monitor\PRTG Configuration.dat

Bat файл для копирование конфигурации

net stop "PRTGProbeService"
ping -n 20 127.0.0.1 > nul
net stop "PRTGCoreService"
ping -n 20 127.0.0.1 > nul
mkdir \\192.168.0.38\Backup\s0082\Configuration.%date:~0,2%.%date:~3,2%.%date:~6,4%
xcopy "C:\ProgramData\Paessler\PRTG Network Monitor\PRTG Configuration.dat" \\192.168.0.38\Backup\s0082\Configuration.%date:~0,2%.%date:~3,2%.%date:~6,4%\ /R /K /Y
ping -n 20 127.0.0.1 > nul
net start "PRTGCoreService"
ping -n 20 127.0.0.1 > nul
net start "PRTGProbeService"
pause

Архивация и копирования конфигурации

net stop "PRTGProbeService"
ping -n 20 127.0.0.1 > nul
net stop "PRTGCoreService"
ping -n 20 127.0.0.1 > nul
set now=%TIME:~0,-3%
set now=%now::=.%
set now=%now: =0%
set now=%DATE:~-4%.%DATE:~3,2%.%DATE:~0,2%_%now% 
"C:\Program Files\7-Zip\7z.exe" a "\\192.168.0.38\Backup\s0082\config%now%.zip" "C:\ProgramData\Paessler\PRTG Network Monitor\PRTG Configuration.dat"
ping -n 20 127.0.0.1 > nul
net start "PRTGCoreService"
ping -n 20 127.0.0.1 > nul
net start "PRTGProbeService"
pause

Удаление архива старше 30 дней

net use u: \\192.168.0.38\Backup\s0082
forfiles.exe /p U:\configuration\ /s /d -30 /m *.* /c "cmd /c del /q @file"
net use u: /delete
paus

Leave a Reply

Your email address will not be published. Required fields are marked *

You can use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>