Re: PgAgent Installation ERROR
От | Kranti™ K K Parisa |
---|---|
Тема | Re: PgAgent Installation ERROR |
Дата | |
Msg-id | 4478b4ac0905041153h48de4f6cx3106be55fc9116ce@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: PgAgent Installation ERROR (Dave Page <dpage@pgadmin.org>) |
Ответы |
Re: PgAgent Installation ERROR
|
Список | pgadmin-support |
Registering file is done and then defined the bat file and created a job. the backup file is getting generated but its of 0kb
plz check the following for the bat file content
--------------
@echo off
REM - backup directory can be a file server share that the PgAgent windows service account has access to
set BACKUPDIR="E:/POSTGRESJOBS/DAILYBACKUPS/"
set PGHOST="localhost"
set PGPORT="5433"
set PGUSER="postgres"
set PGBIN="C:/Program Files/PostgreSQL/8.3/bin/"
for /f "tokens=1-4 delims=/ " %%i in ("%date%") do (
set dow=%%i
set month=%%j
set day=%%k
set year=%%l
)
for /f "tokens=1-3 delims=: " %%i in ("%time%") do (
set hh=%%i
set nn=%%j
)
REM - It would be nice to use gzip in the pg_dumpall call (or if pg_dumpall supported compression as does the pg_dump)
REM here as we do on the linux/unix script
REM - but gzip is not prepackaged with windows so requires a separate install/download.
REM Our favorite all purpose compression/uncompression util for Windows is 7Zip which does have a command-line
%PGBIN%pg_dump -i -h %PGHOST% -p %PGPORT% -U %PGUSER% -F c -b -v -f "%BACKUPDIR%DATABASENAME-%year%%month%%day%%hh%.backup" DATABASENAME
--------------------------
--
Kranti K K Parisa
M: +91 - 9391 - 438 - 738
O: +91 - 4023 - 844 - 738
------------------------------------------------------------------
" world will be different, if...... "
------------------------------------------------------------------
plz check the following for the bat file content
--------------
@echo off
REM - backup directory can be a file server share that the PgAgent windows service account has access to
set BACKUPDIR="E:/POSTGRESJOBS/DAILYBACKUPS/"
set PGHOST="localhost"
set PGPORT="5433"
set PGUSER="postgres"
set PGBIN="C:/Program Files/PostgreSQL/8.3/bin/"
for /f "tokens=1-4 delims=/ " %%i in ("%date%") do (
set dow=%%i
set month=%%j
set day=%%k
set year=%%l
)
for /f "tokens=1-3 delims=: " %%i in ("%time%") do (
set hh=%%i
set nn=%%j
)
REM - It would be nice to use gzip in the pg_dumpall call (or if pg_dumpall supported compression as does the pg_dump)
REM here as we do on the linux/unix script
REM - but gzip is not prepackaged with windows so requires a separate install/download.
REM Our favorite all purpose compression/uncompression util for Windows is 7Zip which does have a command-line
%PGBIN%pg_dump -i -h %PGHOST% -p %PGPORT% -U %PGUSER% -F c -b -v -f "%BACKUPDIR%DATABASENAME-%year%%month%%day%%hh%.backup" DATABASENAME
--------------------------
2009/5/5 Dave Page <dpage@pgadmin.org>
2009/5/4 Kranti™ K K Parisa <kranti.parisa@gmail.com>:> Hi DaveWhat file generated? Registering the service doesn't generate any files.
>
> Thanks for the reply I shall try on this
> I have done that on xp and it has worked.
>
> How ever the file generated is with 0kb. please suggest what next to be
> checked?
--
--
Kranti K K Parisa
M: +91 - 9391 - 438 - 738
O: +91 - 4023 - 844 - 738
------------------------------------------------------------------
" world will be different, if...... "
------------------------------------------------------------------
В списке pgadmin-support по дате отправления: