recieve the following error on the database server
LOG: archive command failed with exit code 1
DETAIL: The failed archive command was: scp pg_xlog/000000010000000000000001 firstname.lastname@example.org:/backups/dbserver/00000001000000000000000
/usr/bin/ssh: Permission denied
i can manually run the command and the file will copy.
Anyone seen this before?
I also encounter the error before.
As far as I know, there are two possible cause:
1. Remote "user" does not have permission on the directory "/backups/dbserver/"
2. scp asks for user password.
I met the later one, and solved the problem by setting up ssh key login (Check out 4.2 Configuring a Database Server for BART Management | EnterpriseDB ).
Hope my experience can help you.
I'm assuming that "user" is actually the OS user that owns the postmaster process (typically it is "postgres" or "enterprisedb," depending on what distribution of Postgres you're using). Have you verified that this OS user has permissions to 1) call /usr/bin/ssh and 2) log in to the remote server as itself? The error message "/usr/bin/ssh: Permission denied" seems to suggest that the OS user doesn't have access to either call ssh or acces files within /usr or /usr/bin. Can you verify that /usr, /usr/bin and /usr/bin/ssh have valid +x permissions for the necessary OS users?
Is it a pre-requisite to have SELinux in permissive mode for PPAS throughout?
The installation guide (https://www.enterprisedb.com/docs/en/8.4/instguide/Postgres_Plus_Advanced_Server_Installation_Guide-...) states that permissive mode is required only during installation. Thereafter it can be returned to enforcing mode.