Thread: pg_dump exists without any message when running from windows task scheduler
In some servers 8.4 pg_dump exits without any message if running from Task Scheduler. To explore this, I created scheduler task containing line cmd After that I can type manually commands: C:\MyApp\pg_dump>dir /w .. [.] [..] comerr32.dll gssapi32.dll k5sprt32.dll krb5_32.dll libeay32.dll libiconv-2.dll libintl-8.dll libpq.dll msvcp71.dll pg_dump.exe pg_dumpall.exe pg_restore.exe ssleay32.dll zlib1.dll C:\MyApp\pg_dump>pg_dump C:\MyApp\pg_dump>pg_restore C:\MyApp\pg_dump>pg_dumpall As shown, all commands exit without any message. This also happens if command line parameters are passed. So it is not possible to use Task Scheduler to create backups. If same commands are executed from same user account from command prompt directly, they run OK. How to create automatic backups in Windows ? backups are created in server running Windows XP Prof SP3 PostgreSql 8.4 server is installed to C: drive and required files are copied to separate pg_dump directory Andrus.
Andrus wrote: > In some servers 8.4 pg_dump exits without any message if running from > Task Scheduler. > > To explore this, I created scheduler task containing line > > cmd > > After that I can type manually commands: > > C:\MyApp\pg_dump>dir /w > .. > [.] [..] comerr32.dll > gssapi32.dll k5sprt32.dll krb5_32.dll libeay32.dll > libiconv-2.dll libintl-8.dll libpq.dll msvcp71.dll > pg_dump.exe pg_dumpall.exe pg_restore.exe ssleay32.dll > zlib1.dll > > C:\MyApp\pg_dump>pg_dump > > C:\MyApp\pg_dump>pg_restore > > C:\MyApp\pg_dump>pg_dumpall > > As shown, all commands exit without any message. This also happens if > command line parameters are passed. So it is not possible to use Task > Scheduler > to create backups. > If same commands are executed from same user account from command prompt > directly, they run OK. > > How to create automatic backups in Windows ? > > backups are created in server running Windows XP Prof SP3 > PostgreSql 8.4 server is installed to C: drive and required files are > copied to separate pg_dump directory I don't know if you can do that. Why do you need to? If you reference the original files (c:\program files\... or where-ever you installed postgres to), does it work through a scheduled task? -- Postgresql & php tutorials http://www.designmagick.com/
Chris, Thank you. > I don't know if you can do that. Why do you need to? I need to run pg_dump at 2:00 AM every night automatically in Windows computer where PostgreSql server is not installed. > If you reference the original files (c:\program files\... or where-ever > you installed postgres to), does it work through a scheduled task? Yes, scheduled task it works in this case. In some backup clients PostgreSql server is not installed. pg_dump 8.4 and required dlls are simply copied to backup computer from server bin directory. How to create autobackups in this case ? Andrus.
Andrus wrote: > Chris, > > Thank you. > >> I don't know if you can do that. Why do you need to? > > I need to run pg_dump at 2:00 AM every night automatically in Windows > computer where PostgreSql server is not installed. The installer should have an option for 'client only' so you end up with psql, pg_dump and friends but not the database. -- Postgresql & php tutorials http://www.designmagick.com/
> The installer should have an option for 'client only' so you end up with > psql, pg_dump and friends but not the database. From http://www.postgresql.org/download/windows : pgInstaller packages are only being maintained for PostgreSQL 8.2 and 8.3. 8.3 pg_dump returns error for 8.4 database. So there is no such option. Andrus.