pg_basebackup fails with " too many connections for role "replication""
Per comments, pg_roles.rolconnlimit is set to 1 for that role so it needs to be increased a bit to allow for several simultaneous connections.

Choose a more reasonable value, say 5 (or -1 for unlimited) and issue as superuser:

ALTER ROLE replication CONNECTION LIMIT 5;


...or connect with a different database user for pg_basebackup.