Hi,

I can't boot the postgres server anymore. I just have access to the files,
like the /var/lib/postgresql/8.3 path, for example. I use debian and
postgresql-8.3 .

I don't have any sql dump. How can I recover my databases with just the
binary files there?

I tried copy the /var/lib/postgresql/8.3 to another a installation of
postgresql-8.3 on another server, but without success.


Diogo Oliveira de Melo
Ciência da Computação
ICMC - USP São Carlos

Search Discussions

  • Scott Marlowe at Apr 26, 2011 at 3:46 pm

    On Tue, Apr 26, 2011 at 9:43 AM, Diogo Melo wrote:
    Hi,

    I can't boot the postgres server anymore. I just have access to the files,
    like the /var/lib/postgresql/8.3 path, for example. I use debian and
    postgresql-8.3 .

    I don't have any sql dump. How can I recover my databases with just the
    binary files there?

    I tried copy the /var/lib/postgresql/8.3 to another a installation of
    postgresql-8.3 on another server, but without success.
    How did you copy them? What error(s) did you get?
  • Diogo Melo at Apr 26, 2011 at 3:51 pm
    just tar -zcvf 8.3.tar.gz /mnt/sdf/var/lib/postgresql/8.3/

    since i found a way to mount the partition on /mnt/sdf.

    first I installed postgres on a virtual machine and then I extracted the
    8.3.tar.gz at /var/lib/postgresql . when i try to sh
    /etc/init.d/postgresql-8.3 start it runs the command instantly but don't
    launch anything.


    Is there a procedure to recover postgres databases on this occasions??


    Diogo Oliveira de Melo
    Ciência da Computação
    ICMC - USP São Carlos



    On Tue, Apr 26, 2011 at 12:45 PM, Scott Marlowe wrote:
    On Tue, Apr 26, 2011 at 9:43 AM, Diogo Melo wrote:
    Hi,

    I can't boot the postgres server anymore. I just have access to the files,
    like the /var/lib/postgresql/8.3 path, for example. I use debian and
    postgresql-8.3 .

    I don't have any sql dump. How can I recover my databases with just the
    binary files there?

    I tried copy the /var/lib/postgresql/8.3 to another a installation of
    postgresql-8.3 on another server, but without success.
    How did you copy them? What error(s) did you get?
  • Scott Marlowe at Apr 26, 2011 at 3:53 pm

    On Tue, Apr 26, 2011 at 9:50 AM, Diogo Melo wrote:
    just tar -zcvf 8.3.tar.gz /mnt/sdf/var/lib/postgresql/8.3/
    since i found a way to mount the partition on /mnt/sdf.
    first I installed postgres on a virtual machine and then I extracted the
    8.3.tar.gz at /var/lib/postgresql . when i try to sh
    /etc/init.d/postgresql-8.3 start it runs the command instantly but don't
    launch anything.

    Is there a procedure to recover postgres databases on this occasions??
    Pretty much what you are doing is the procedure. Check permissions on
    that folder, look in the postgresql logs, look in the system logs,
    etc. It'll likely say something about wrong permissions, but that's
    just a guess.
  • Diogo Melo at Apr 26, 2011 at 4:55 pm
    You were right. It was just a matter of set chown -R postgres.postgres
    /var/lib/postgresql/8.3

    :D :D :D

    Case solved :D
    Thanks a lot dude :D

    Diogo Oliveira de Melo
    Ciência da Computação
    ICMC - USP São Carlos



    On Tue, Apr 26, 2011 at 12:52 PM, Scott Marlowe wrote:
    On Tue, Apr 26, 2011 at 9:50 AM, Diogo Melo wrote:
    just tar -zcvf 8.3.tar.gz /mnt/sdf/var/lib/postgresql/8.3/
    since i found a way to mount the partition on /mnt/sdf.
    first I installed postgres on a virtual machine and then I extracted the
    8.3.tar.gz at /var/lib/postgresql . when i try to sh
    /etc/init.d/postgresql-8.3 start it runs the command instantly but don't
    launch anything.

    Is there a procedure to recover postgres databases on this occasions??
    Pretty much what you are doing is the procedure. Check permissions on
    that folder, look in the postgresql logs, look in the system logs,
    etc. It'll likely say something about wrong permissions, but that's
    just a guess.
  • Diogo Melo at Apr 26, 2011 at 3:46 pm
    Diogo Oliveira de Melo
    Ciência da Computação
    ICMC - USP São Carlos




    ---------- Forwarded message ----------
    From: Diogo Melo <dmelo87@gmail.com>
    Date: Tue, Apr 26, 2011 at 12:43 PM
    Subject: Recover database from binary files
    To: pgsql-general@postgresql.org


    Hi,

    I can't boot the postgres server anymore. I just have access to the files,
    like the /var/lib/postgresql/8.3 path, for example. I use debian and
    postgresql-8.3 .

    I don't have any sql dump. How can I recover my databases with just the
    binary files there?

    I tried copy the /var/lib/postgresql/8.3 to another a installation of
    postgresql-8.3 on another server, but without success.


    Diogo Oliveira de Melo
    Ciência da Computação
    ICMC - USP São Carlos

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-general @
categoriespostgresql
postedApr 26, '11 at 3:44p
activeApr 26, '11 at 4:55p
posts6
users2
websitepostgresql.org
irc#postgresql

2 users in discussion

Diogo Melo: 4 posts Scott Marlowe: 2 posts

People

Translate

site design / logo © 2022 Grokbase