I have a postgre database that I am trying to set up automatic backups for. I have written a batch file below that creates a backup for me. The script creates the file fine, but the file is always -kb and does not contain any data. Any help would be greatly appreciated. I am running the batch file under administrator permissions and in the same service account as Postgre. Any help would be greatly appreciated.
for /f "tokens=1-4 delims=/ " %%i in ("%date%") do (
echo datestr is %datestr%
echo backup file name is %BACKUP_FILE%
bin\pg_dump -i -h localhost -p 5433 -U timetrex -F c -b -v -f %BACKUP_FILE% timetrex