User Tools

Site Tools


reference:batch_file_to_end_a_database_backup

Batch file to end a database backup

VPOP3 runs pg_dump.exe to perform the regular database backups. Ending this process through Task Manager will not end the back-end database processes creating the backup data. This batch file will do it for you.

Save this in the VPOP3 installation directory as a file such as 'endbackup.cmd'

@ECHO OFF
SETLOCAL
CALL psqlparams.cmd
SET PGPASSWORD=pgsqlpass
taskkill /f /im:pg_dump.exe
"%PSQLPATH%\psql" -U postgres -c "select pg_cancel_backend((select procpid from pg_stat_activity where application_name='pg_dump'));" vpop3
SET PGPASSWORD=

Or download the batch file here: endbackup.cmd

Save it to the VPOP3 directory and run it from a command prompt (run “as an administrator”)

Keywords: stop kill terminate backup

reference/batch_file_to_end_a_database_backup.txt · Last modified: 2018/11/14 10:45 by 127.0.0.1