<quote> 25.3.3.1. Making a non-exclusive low level backup ... The connection calling pg_start_backup must be maintained until the end of the backup, or the backup will be automatically aborted. ... </Quote>
The sample works with a NON-persistent connection (psql -c):
<quote> 25.3.6.1. Standalone Hot Backups ... touch /var/lib/pgsql/backup_in_progress psql -c "select pg_start_backup('hot_backup');" tar -cf /var/lib/pgsql/backup.tar /var/lib/pgsql/data/ psql -c "select pg_stop_backup();" rm /var/lib/pgsql/backup_in_progress tar -rf /var/lib/pgsql/backup.tar /var/lib/pgsql/archive/ ... </quote>