Reputation: 223
So, I want to backup my database using the pgagent.
OS: Windows 10 (64 Bit)
I found out that pgagent is not installed in my environment.
So, I upgraded my pgAdmin to V4.3 and with that I am trying to install pgagent via Stackbuilder's edb_pgagent_pg13 option. The exe is downloaded on my system but when I install it, I get this error:
Then, I saw that there is no folder called postgresql in my APPDATA folder so I created one. "C:\Users\Harshad\AppData\Roaming\postgresql" and then again run the edb_pgagent_pg13.exe
I am still getting the same error.
now, either I don't know how to create the pgpass.conf file or I dont know how to correctly create it.
These steps I followed are:
On starting Stackbuilder again as an admin, I chose just the pgagent option but it gives me an error saying incorrect system username and password. It is required for the installation" When I did not get an option to enter credentials.
What should I be doing correctly to get pgagent which will allow me to create and schedule backup jobs?
Edit: Added OS information
Upvotes: 1
Views: 3588
Reputation: 108
Note that this may also be your antivirus (in our case CrowdStrike) killing the pgAdmin installation midway through. You may need to whitelist as appropriate.
Upvotes: 0
Reputation: 738
I faced the same issue when installing pgAgent, and it came down to the Windows Password Policy.
In the final installation step, you are asked to provide an OS account for the service. By default, it uses "postgres", which is the account created by PostgreSQL. In my case, I didn't have an account named "postgres", suggesting that PostgreSQL might not always create this account during installation. This might be version-specific behavior (I used PostgreSQL 13 and 15).
If the account isn't present, the installer will create it. I ran into a hurdle here: my Windows Server 2019 had the "password must meet complexity requirements" policy enabled. The password I provided didn't fulfill these requirements, leading to a failure in account creation and the subsequent error you mentioned.
For those in a similar predicament, here are a few validated solutions:
Upvotes: 1
Reputation: 38
When you installed PostgreSQL it used 'postgres' Windows account. You need to install pgAgent using this same account.
That is what worked for me.
Upvotes: 0