I'm creating a Windows Service application in c# to automate PostGreSql database backups. (With scheduled tasks to do full backups, clean old files, ...)
To do it, I first need to edit the postgresql.conf file, uncomment some parameters and change some values to enable Write-Ahead Logging ( WAL ).
I would like to do it automatically from my code. Is there a simple way or existing code to do it ?
I found this Linux script but I need to do it from C#...
Example of parameters to edit:
# - Archiving -
archive_mode = on
archive_command = 'copy "%p" "C:\\Backups\\%f"'
archive_timeout = 600 # force a logfile segment switch after this number of seconds
Is there a standard name for this kind of configuration file ?