I check https://ambari.apache.org/current/installing-hadoop-using-ambari/content/ambari-chap11-1.html and try to backup ambarirca. But it failed.
$ pg_dump -U mapred ambarirca
pg_dump: [archiver (db)] connection to database "ambarirca" failed: FATAL: password authentication failed for user "mapred"
What version of Ambari and HDP are you using? ambarirca database was previously used to store MR job-related info in HDP 1.x. That has been replaced by YARN's App Timeline Service in HDP 2.x. If you are using HDP 2.x, then you don't really need to back that up.
Oh, sorry. I forgot to write version.
I use Ambari 2.4.2 and HDP 2.5.3.
I understand that it's not necessary to back ambarirca up.
Yes, you are right that it's not necessary to back ambarirca up.
However if you want to avoid the error that you are getting while taking a backup then you will need to use "-h localhost" as following , because "ambarirca" db has localhost access only (by default):
# pg_dump -h localhost -U mapred ambarirca > ambarirca.sql Password: mapred