Barman does not have a mode to initialize the newly-restored server as a streaming replica of the original. To do this, create a file named recovery.conf in the /db/pgdata directory with the following contents before starting PostgreSQL:
standby_mode = 'on' primary_conninfo = 'host=pg-primary user=postgres'
If you've followed the recipes in the previous chapters, you may also consider using the rep_user user instead, as we created it specifically for replication purposes.