On 4/20/22 01:06, Thomas, Richard wrote:
Adrian Klaver wrote:
What are the actual commands you are using to do the above?
The command used in a PowerShell script (run with Windows task scheduler) to dump each database should evaluate to:
"C:\Program Files\PostgreSQL\10\bin\pg_dump.exe" -b -v -F c -d $dbName -h localhost -p 6488 -U backup_su -f $backupFile 2`>`&1 | Out-File $pgdumpLogFile
FYI, -b is the default unless you are restricting the dump to a schema
or a table .
Do you have large objects(blobs) in the database?
where:
- "backup_su" is a superuser role (with password stored in the user's pgpass.conf file)
- $backupFile and $pgdumpLogFile are in folders excluded from McAfee scanning
- pg_dump.exe executable is not excluded from McAfee on-access scanning (although as recommended postgres.exe is)
Why not?
I would think the whole C:\Program Files\PostgreSQL\10\bin\ would be
excluded.
The actual script segment building the command is:
$pgdumpCmd = "C:\Program Files\PostgreSQL\10\bin\pg_dump.exe"
$pgdumpArgs = @("-b", "-v",
"-F", "c",
"-d", $dbName,
"-h", "localhost",
"-p", "6488",
"-U", " backup_su",
"-f", $backupFile)
cmd /c $pgdumpCmd $pgdumpArgs 2`>`&1 | Out-File $pgdumpLogFile
Note that the .backup file for the first failing pg_dump (after several successful ones) is now being produced but is of length 0, with the associated pg_dump log file simply reading:
What does the Windows event log show?
Same for the A/V software log.
pg_dump: [archiver (db)] connection to database "dbexample" failed: could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 6488?
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 6488?
Richard
--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx