Permission denied error when PostgreSQL uses 'rsync' in its backup jobs.

Solution Verified - Updated -

Issue

  • PostgreSQL returns a non-zero exit code while using rsync for the backup process. Rsync works fine from the command line. 

    sh: /usr/bin/rsync: Permission denied
    2024-07-10 19:00:44.793 BST [2666298] FATAL:  XX000: archive command failed with exit code 126
    2024-07-10 19:00:44.793 BST [2666298] DETAIL:  The failed archive command was: /usr/bin/rsync -a pg_wal/000000040000000300000068 /db/postgresql/pg13/archive/000000040000000300000068
    && rsync -e ssh  -a  pg_wal/000000040000000300000068 
    

Environment

  • Red Hat Enterprise Linux 8

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content