вторник, 10 ноября 2015 г.

Data Protector Post-exec and extended report of volume

TASK: after backup need to make table of total size and count of files of catalogs of second level for volumes VOL2, VOL4, VOL5 и VOL7 and show it in web.

Data Protector email report has view:

Cell Manager: matador2
Creation Date: 9/8/2015 11:54:14 PM

Session Information

Specification: EngineFC
Session ID: 2015/09/08-3
Type: Backup
Session Owner: matador2\ADMINISTRATOR@matador2
Status: Completed/Failures
Mode: incr
Start Time: 9/8/2015 9:00:05 PM
Queuing: 0:00
Duration: 2:54
GB Written: 733.24
# Media: 3
# Errors: 8
# Warnings: 14
Success: 100%

Command of next view allows to get full list of files and their sizes for volume:
omnidb -winfs engine.zp.ua:/K "K:" -session 2015/10/23-3 -catalog  > c:\report.txt

I have coded test script and pointed his name to the field:
HP Data Protector Manager / Backup / Backup Object Summary / Properties... / Options / Post-exec / dp_post_exec.cmd.
But I got error:
[Critical] From: VBDA@engine.zp.ua "O:"  Time: 09.11.2015 13:04:41
[61:3005]    Cannot perform stat() on script "C:\Program Files\OmniBack\bin\/dp_post_exec.cmd",
    system reports: "[2] The system cannot find the file specified "
[Critical] From: VBDA@engine.zp.ua "O:"  Time: 09.11.2015 13:04:41
    Post-exec failed with exitcode -1 => backup aborted!

After reading Internet I have understood that script is run on client side but I placed script on server!

I pointed script and server in:
HP Data Protector Manager / Backup / Options / Backup Specification Options / Advanced... / Post-exec / Post-exec: dp_post_exec.cmd, On client: matador2.
It worked!

After that I had coded needed script:

@echo off

rem set s=2015/11/09-16
set s=%SESSIONID%
set s=%s:/=-%

rem echo %MODE%

if "%MODE%"=="Full" (

omnidb -winfs engine.zp.ua:/O "engine.zp.ua [/O]" -session %SESSIONID% -catalog > c:\for_popus3\%s%_VOL4.txt
omnidb -winfs engine.zp.ua:/M "engine.zp.ua [/M]" -session %SESSIONID% -catalog > c:\for_popus3\%s%_VOL5.txt
omnidb -winfs engine.zp.ua:/L "engine.zp.ua [/L]" -session %SESSIONID% -catalog > c:\for_popus3\%s%_VOL7.txt
omnidb -winfs engine.zp.ua:/K "engine.zp.ua [/K]" -session %SESSIONID% -catalog > c:\for_popus3\%s%_VOL2.txt

)

I shared catalog and mounted it on web-server:

# cat /etc/fstab |grep popus3
//matador2/for_popus3 /var/www/html/ddd/reports cifs password=ghgh,username=popus3 0 0

# ls -l /var/www/html/ddd/reports
total 324287
-rwxr-xr-x 1 root root    549948 Nov  9 16:01 2015-11-05-3_VOL2.txt
-rwxr-xr-x 1 root root  22405483 Nov  9 14:54 2015-11-05-3_VOL4.txt
-rwxr-xr-x 1 root root 308991002 Nov  9 15:42 2015-11-05-3_VOL5.txt
-rwxr-xr-x 1 root root    122328 Nov  9 15:50 2015-11-05-3_VOL7.txt

Now on web-server need to code script for parsing these reports and showing table in browser.

Комментариев нет:

Отправить комментарий