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.

postgres 8 upgrade

Discussion in 'General Discussion' started by vyaskr, Oct 14, 2005.

  1. vyaskr

    vyaskr Registered

    Joined:
    Mar 11, 2005
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    hi all,

    I am running cPanel 10.8.0-R65 on RedHat Enterprise 3

    I have upgraded the postgres server from version 7.3.9 to 8.0.4
    But the backup in cpanel for postgres is not taking place now.

    i get these errors when the script cpbackup is getting fired

    Grabbing PostgreSQL databases............
    could not change directory to "/root"
    could not change directory to "/root"
    Done
    Grabbing PostgreSQL privileges...could not change directory to "/root"
    could not change directory to "/root"
    could not change directory to "/root"

    I checked out the pkgaccnt script which is getting called from cpbackup
    it seems to be running two programs
    /usr/local/cpanel/bin/postgresadmin and /usr/local/cpanel/bin/postgreswrap for creating dump files.
    I am not able to figure out what exactly is the cause of the errors


    thanks in advance,
    kailash
     
  2. darkelder

    darkelder Well-Known Member

    Joined:
    Oct 8, 2004
    Messages:
    74
    Likes Received:
    0
    Trophy Points:
    6
  3. darkelder

    darkelder Well-Known Member

    Joined:
    Oct 8, 2004
    Messages:
    74
    Likes Received:
    0
    Trophy Points:
    6
    Here I reproduced same problem.

    /scripts/pkgacct uses a binary /usr/local/cpanel/bin/postgresadmin and /usr/local/cpanel/bin/postgreswrap to get postgres dumps.

    On cpbackup/daily/user/psql/ .gz file is created, but its contents is an error string "Unrecognized Command!". The error is the same that following comand returns:

    echo \"foo\" | /usr/local/cpanel/bin/postgresadmin

    Things changed from 7.3 to 8.1 :)


    Will cPanel fix this issue?


    We need to make a manual backup.

    On http://www.cpwiki.org/index.php?title=How-To:_Upgrading_PostgreSQL_to_8.1 I write a simple and temporary backup script
     
  4. madmac

    madmac Well-Known Member

    Joined:
    Jan 11, 2004
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Hi Roberto,

    I just wanted to report that your PostgreSQL 8.1 upgrade guide worked fantastic on CentOS 3.6. I used the RHEL3 RPMS and it went off without a hitch.

    Also the phpPgAdmin is a very old version, and cPanel does not seem to maintain it, so for better PostgreSQL 8 support I also had to manually update that to the latest version (4.0.1 as of this writing). Which is really simple to do, just remove the old version, download the new version, unpack it, place it where the old version was, alter the config file to your desire (only show owned databases is off by default so you'll want to at least change that) and chown everything to the user cpanel.

    Now we're cruising with PostgreSQL 8.1.1 ;)
     
  5. darkelder

    darkelder Well-Known Member

    Joined:
    Oct 8, 2004
    Messages:
    74
    Likes Received:
    0
    Trophy Points:
    6
  6. sp0k0

    sp0k0 Registered

    Joined:
    Oct 11, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Thank you.

    Just wanted to add to the list of people who used your tutorial and are satesfied. I am using cPanel 10.8.1-R113 with PostgreSQL 8.1.2 on a RH ES3 and it works quite nicely.

    If someone can post something more about upgrading phppgAdmin I'd be glad to up that too.

    Thank you again.
     
  7. miridis

    miridis Registered

    Joined:
    Nov 2, 2005
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Apache integration

    Thanks for the nice tutorial. I've got Postgres 8.1.1 running.

    Now I have a new problem. Apache can't find the correct shared library.

    Cannot load /usr/local/apache/libexec/libphp4.so into server: libpq.so.3: cannot open shared object file: No such file or directory

    I guess Apache has to be recompiled but I'm not experienced with that. I thought that I just use cPanel to re-configure apache but I'm afraid it will re-install version 7.4.

    Do you have any suggestions on how to get Apache/PHP talking to my Postgres 8.1.1?

    Any hint is appreciated!
     
  8. darkelder

    darkelder Well-Known Member

    Joined:
    Oct 8, 2004
    Messages:
    74
    Likes Received:
    0
    Trophy Points:
    6
    Just recompile Apache by cPanel and it should work.

    Also, do add on up2date --config an exclusion to "rh-postgres-*" if you're afraid cPanel will update.



    Currently february cPwiki (http://cPwiki.org) updates:

    How-To
    * 07-Fev-2006 - How-To: Recoving a corrupted Postgres Database Index
    * 04-Fev-2006 - How-To: Replacing /var/named domains IP addresses with perl

    Troubleshotting cPanel
    * 12-Fev-2006 - Troubleshotting: cleaning ghosts Apache semaphores Apache hangs with a "semget: No space left on device" error on "/etc/httpd/logs/error_log
    * 08-Fev-2006 - Stats stopped working when cPanel ran "/scripts/runlogsnow" it returns error: "Modification of a read-only value attempted at /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/DBI.pm line 279": upgrade your PERL at least to 5.8.7. See on this great cPanel Forum article why and how to fix it.
    * 01-Fev-2006 - Troubleshotting: Fixing disapeared users from WHM listings
     
  9. fleksi

    fleksi Well-Known Member

    Joined:
    Sep 17, 2003
    Messages:
    125
    Likes Received:
    0
    Trophy Points:
    16
    phpPgAdmin not showing databases?

    I have already upgraded to the latest version (8.1.2) and restore the old databases, but now my clients are not seeing their databases from their phpPgAdmin.
    I am using phpPgAdmin ver 4.0.1 and set $conf['owned_only'] = true in config.inc.php

    How to fixed this?

    Thank you.
    -FL-
     
  10. adept2003

    adept2003 Well-Known Member

    Joined:
    Aug 11, 2003
    Messages:
    283
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    ~ "/(extra|special)/data"
    Install went relatively smoothly, although I found I had to install config (through whm) before restoring the old db (wiki says to do it the other way round).

    Seems that all new db's are created using LATIN1 encoding as the default, rather than SQL_ASCII. Any ideas how to correct this?

    Also, we're having an issue with an error when trying to restore a particular db:

    Any ideas?
     
  11. touma

    touma Member

    Joined:
    Apr 13, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    São Paulo - Brasil
    Any news on this? Is backup fixed? :)
     
  12. calande2

    calande2 Well-Known Member

    Joined:
    Jun 28, 2005
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
  13. trhosting.net

    trhosting.net Well-Known Member

    Joined:
    Mar 7, 2006
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Turkey
  14. darkelder

    darkelder Well-Known Member

    Joined:
    Oct 8, 2004
    Messages:
    74
    Likes Received:
    0
    Trophy Points:
    6
    They'll not resolve this feature request. cPanel will use distribution packages.
     
  15. erick_paper

    erick_paper Well-Known Member

    Joined:
    Apr 19, 2005
    Messages:
    245
    Likes Received:
    0
    Trophy Points:
    16
    Well how to INSTALL it (not upgrade)???

    I downloaded all the RPMs and installed them one by one, starting with 8.2.1 then with 8.2.1-libs, then 8.2.1-server...etc. It went without a hitch.

    Now when I do "service postgresql restart" it tells me service not found. I go into WHM (2087) and "Install Config", which is ok. Then I change password and it tells me "no user. have you installed pgsql?".

    Any thoughts?

    And how to install the latest PhpPgAdmin with cpanel?

    Thanks!
     
    #15 erick_paper, Jan 22, 2007
    Last edited: Jan 22, 2007
  16. hekri

    hekri Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    149
    Likes Received:
    2
    Trophy Points:
    18
    -bash-3.00$ psql -f /var/lib/pgsql_old/backups/postgresql_backup template1
    psql: FATAL: password authentication failed for user "postgres"
    -bash-3.00$



    Someone help me?

    I also test WHM/postgres/

    Install config
    and change root password

    And still nothing i cant login to postres :(
     
  17. Azraell

    Azraell Member

    Joined:
    Aug 2, 2006
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Brasil / Rio de Janeiro
    Change the password for Postgre through WHM.
     
  18. erick_paper

    erick_paper Well-Known Member

    Joined:
    Apr 19, 2005
    Messages:
    245
    Likes Received:
    0
    Trophy Points:
    16
  19. erick_paper

    erick_paper Well-Known Member

    Joined:
    Apr 19, 2005
    Messages:
    245
    Likes Received:
    0
    Trophy Points:
    16
    These instructions do not work for upgrading from 8.2.x --> 8.3.x.

    Any chance of updating the steps one by one?

    Thanks!
     
  20. Zion Ahead

    Zion Ahead Well-Known Member

    Joined:
    Nov 10, 2006
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    root@server [~]# su postgres
    bash-3.00$ postmaster --version
    postgres (PostgreSQL) 8.2.1


    Trying to ugprade to 8.3 via this tutorial http://cpwiki.org/wiki/How-To:_Upgra...tgreSQL_to_8.1

    bash-3.00$ pg_dumpall > /tmp/dbdo28.out
    could not change directory to "/root"
    pg_dumpall: pg_dump failed on database "user_cms", exiting
     
Loading...

Share This Page