The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Where are the postgresql databases?

Discussion in 'General Discussion' started by casey, Sep 11, 2003.

  1. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    MySQL databases are in /var/lib/mysql , but I can't seem to find the postgres databases. Anyone know where they are?

    Also, do they get transfered over when you move an account from one server to another?

    cPanel.net Support Ticket Number:
     
  2. perlchild

    perlchild Well-Known Member

    Joined:
    Sep 1, 2002
    Messages:
    279
    Likes Received:
    0
    Trophy Points:
    16
    /var/lib/pgsql is the canonical place, but postgres databases can only be copied through a dump, never by copying the files. I doubt the pkgacct features include pg_dump yet, they might in a later release however(I saw no signs of it on my server though).

    cPanel.net Support Ticket Number:
     
  3. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    Re: Re: Where are the postgresql databases?

    I see. Thanks for the info. Can I use pg_dump to copy pgsql databases from one server to another? Will the permissions be okay? If so, how can I do this? If at all possible I'd rather not make my customers reconstruct their databases...

    cPanel.net Support Ticket Number:
     
  4. perlchild

    perlchild Well-Known Member

    Joined:
    Sep 1, 2002
    Messages:
    279
    Likes Received:
    0
    Trophy Points:
    16
    Re: Re: Re: Where are the postgresql databases?

    That is what that script is for. I do believe permissions are included in a pg_dump unlike mysql's method for conserving permissions.

    cPanel.net Support Ticket Number:
     
  5. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    Re: Re: Re: Re: Where are the postgresql databases?

    Thanks. I'll look into it.

    cPanel.net Support Ticket Number:
     
  6. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    Re: Re: Re: Re: Re: Where are the postgresql databases?

    I just looked briefly at the postgres manual, and it appears that pg_dumpall is better...?

    cPanel.net Support Ticket Number:
     
  7. perlchild

    perlchild Well-Known Member

    Joined:
    Sep 1, 2002
    Messages:
    279
    Likes Received:
    0
    Trophy Points:
    16
    Re: Re: Re: Re: Re: Re: Where are the postgresql databases?

    pg_dumpall is a leaner, more specialized machine, it dumps all the databases, which may or may not be what you want, and has to be run as the postgres user

    cPanel.net Support Ticket Number:
     
  8. ricardom

    ricardom Active Member

    Joined:
    Mar 10, 2004
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    pgdump_all error

    Hello,

    Im trying to dump all the postgres database from the server, but im getting this error:

    pg_dumpall: could not connect to database template1: FATAL: Password authentication failed for user "root

    I tried to change the postgres password in WHM, but the results are the same, anyone know how to deal with that?

    Thanks.
     
  9. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    su to the postgres user first:

    su - postgres
     
  10. ttremain

    ttremain Well-Known Member

    Joined:
    Feb 16, 2003
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    Now how do I restore this pg_dumpall file ?

    I tried using pg_restore but I get the message:
    pg_restore: [archiver] input file does not appear to be a valid archive
     
  11. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
Loading...

Share This Page