Hi,

I share with this information in order to help 1C developers create .bat file automatic backup, even if 1C infobase is located on PostgreSQL on Windows OS.

1. Create text document. and input there those code

Code
SET datestr=%date:~-4,4%-%date:~7,2%-%date:~-10,2%
SET BACKUP_FILE=D:\1TC\backs\1TC-ERP-%datestr%.backup
SET PGPASSWORD=aburcubur12L
"C:\Program Files (x86)\PostgreSQL\9.2.1-1.1C\bin\pg_dump.exe" -U postgres -h localhost -p 5432 -F c -v -f %BACKUP_FILE% erp1tc


Let me explain code:
D:\1TC\backs\ - is direction where you want to locate your backup file.
aburcubur12L - is password to access to PostgreSQL server if needed.
"C:\Program Files (x86)\PostgreSQL\9.2.1-1.1C\bin\pg_dump.exe" - full location of "pg_dump.exe" file.
erp1tc - is database name in PostgreSQL.

2. Save it as ".bat" extension.

3. Goto Task Scheduler on Windows and set up your settings.