Skip to content

Instantly share code, notes, and snippets.

@macroramesh6
Created January 27, 2022 03:41

Revisions

  1. macroramesh6 created this gist Jan 27, 2022.
    15 changes: 15 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    :: copy pg_hba.conf to the E:/postgres location
    :: this is to allow the postgres user to connect to the database
    @echo off

    :: XCOPY Docs https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/xcopy#syntax
    XCOPY /F /Y /D "C:\Program Files\PostgreSQL\9.3\pg_hba.conf" "E:\postgres\pg_hba.conf"

    :: Restart PostgresSQL server
    @REM pg_ctl restart
    @REM call
    ::net stop postgresql
    ::net start postgresql


    :: run this on every hour