How to Automatically Back-up the PostgreSQL Database

How to Automatically Back-up the PostgreSQL Database

To automatically backup the PassagePoint PostgreSQL database, create a Windows task with the changes below to invoke the PostgreSQL agent to back up the database.

Create a batch file with the line below, and add it to your Window task:

pg_dump -i -h localhost -U postgres -F c -b -v -f "c:\sotest.backup" amber3

postgres is the user name
sotest.backup = file name
amber3 = database name

Be sure to edit your pg_hba.conf file located in c:\postgres\data, in order for this to work correctly, because running the command above will ask you for a password.

# TYPE DATABASE USER CIDR-ADDRESS METHOD

# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
#host all all ::1/128 md5

Change to:

# TYPE DATABASE USER CIDR-ADDRESS METHOD

# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
#host all all ::1/128 md5

    • Related Articles

    • Use MSSQL database instead of PostgreSQL

      If you want to use SQL, after PassagePoint has been installed >> go to \PPGlobal\config delete the first 'sqlcontext.xml' file. Then rename the 'sqlcontext.xml.mssql' to 'sqlcontext.xml' Here - edit the new updated 'sqlcontext.xml' You will need to ...
    • How to Reset the Admin password (PostgreSQL Backend)

      If you don't know what back end DB you are running, see here first: https://support.stopware.com/portal/en/kb/articles/what-backend-database-am-i-running for SQL backend see here: Reset passagepoint Admin password with SQL server Backend ...
    • How to connect to Microsoft SQL database and encyrpt user password

      Note: For windows authentication see KB article https://support.stopware.com/portal/en/kb/articles/sqlcontext-for-windows-authentication For SQL Authentication see instructions below. If TLS is required, see attachements. 1) Create a clean database ...
    • How do I backup my database before performing a PassagePoint upgrade?

      It is IMPORTANT you make sure you make backups before the update. On the PassagePoint Application side, locate the PPGlobal folder and backup the entire "config" folder. On the Database side, see steps below if using postgresql. (If running MS SQL ...
    • What Backend Database am I running

      if you don't know what backend DB, check the sqlContext.xml file on the server C:\PPGlobal\Config\sqlcontext.xml The example below is going out to MS SQL server as the red circle indicates The example below is for postgresql