If you are using the built in EventSentry database, you can back it up using the "pg_dump.exe" utility. This is located by default in the EventSentry\postgresql14\bin folder.
You can create a batch file with the following contents:
Please note: If you still use Postgres 9.6, pgdump.exe will be in the "C:\Program Files (x86)\EventSentry\postgresql96\bin" folder instead. Also consider the C:\backups\ path in the script is an example, you should change to a path that exists on your server with enough free space for the backup. Lastly, the word "EventSentry" at the end of the script is a placeholder for the name of your database. To check what your database name is, you can open the EventSentry console to Actions > Primary Database, click the "create" button, and see the database name and port.
Right-click the batch file and choose Run As Administrator, and this will dump the entire database into a file that can be restored. The .backup file it produces can be backed up with your regular backup software as well.
Please see the reference link at the bottom of this article for more information regarding how to make this more automated.
To restore the database from a backup, run these commands from the command prompt after opening the command prompt using Run As Administrator:
*Please note: If you still use Postgres 9.6, psql.exe and pg_restore.exe will be in the "C:\Program Files (x86)\EventSentry\postgresql96\bin" folder instead