Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6830227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:35:35+00:00 2026-05-26T22:35:35+00:00

I’m trying to make database dumps of my Django site, but Django’s native dumpdata

  • 0

I’m trying to make database dumps of my Django site, but Django’s native dumpdata command is rather terrible for large databases, so I want to use pg_dump.

This works:

python
>>> import psycopg2
>>> psycopg2.connect(database='blah',user='blah',password='blah',host='localhost')

This doesn’t work

bash
# psql -U blah blah
psql: FATAL:  Ident authentication failed for user "blah"
# pg_dump -U blah blah
pg_dump: [archiver (db)] connection to database "blah" failed: FATAL:  Ident authentication failed for user "blah"

My searches suggest that maybe I need to change “ident” to “password” in /etc/postgresql/9.0/main/pg_hba.conf. Is that a reasonable thing to change? Why can’t I get into pg_dump using whatever method already works fine for python psycopg2?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:35:36+00:00Added an answer on May 26, 2026 at 10:35 pm

    If you supply -h localhost on the psql/pg_dump command line, it will connect over a TCP socket instead of a unix socket. These can have different authentication methods defined in pg_hba.conf. Since “ident authentication” only applies to unix sockets, it certainly appears that’s what’s going on.

    Changing pg_hba.conf to use “md5” instead of “ident” for “local” lines (unix sockets) is reasonable, to stick with using the passwords defined in postgresql user accounts instead of expecting the unix username to identify the postgresql username.

    In the default Debian config, the line for authenticating as “postgres” is put in separately, so that you can change the default for other users to md5 or trust as you wish, leaving just that one account protected. Istr some mutterings from Postgres users about how Debian/Ubuntu’s default of having “ident” authentication is more confusing than helpful.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to select an H1 element which is the second-child in its group
This could be a duplicate question, but I have no idea what search terms

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.