Databases

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Restoring databases from a different installment on Windows

    4 answers - 804 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    I have recently reinstalled my Windows mychine, including the
    PostgreSQL server, but (due to a system crash, unrelated to Postgres) I
    wasn't able to dump my databases to import them now. However, I have a
    full copy of the original system, including all the files of the
    original Postgres installation.
    Is there a way to restore the databases from the original installation
    into the new one? For example, in MySQL I would be able to just copy
    the data files; is there something similar in Postgres?
    Thanks,
    Berislav
    (end of broadcast)
    TIP 1: if posting/reading through Usenet, please send an appropriate
    subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
    message can get through to the mailing list cleanly
  • No.1 | | 272 bytes | |

    Well, I did try that, but PostgreSQL service refused to start. :(
    Berislav
    (end of broadcast)
    TIP 9: In versions below 8.0, the planner will ignore your desire to
    choose an index scan if your joining column's datatypes do not
    match
  • No.2 | | 974 bytes | |

    Sun, May 28, 2006 at 07:24:56 -0700,
    Berislav Lopac <berislav.lopac (AT) gmail (DOT) comwrote:
    I have recently reinstalled my Windows mychine, including the
    PostgreSQL server, but (due to a system crash, unrelated to Postgres) I
    wasn't able to dump my databases to import them now. However, I have a
    full copy of the original system, including all the files of the
    original Postgres installation.

    Is there a way to restore the databases from the original installation
    into the new one? For example, in MySQL I would be able to just copy
    the data files; is there something similar in Postgres?

    Yes it should work. There should be a recovery if postgres was running when
    the boc crashed.
    Note, you don't want to copy files out from under a running server to do
    backups. That won't work.

    (end of broadcast)
    TIP 4: Have you searched our list archives?

    http://archives.postgresql.org
  • No.3 | | 867 bytes | |

    Bruno Wolff III wrote:
    Yes it should work. There should be a recovery if postgres was running when
    the boc crashed.
    Note, you don't want to copy files out from under a running server to do
    backups. That won't work.

    Actually, my situation is like this:

    I had a properly running version of Postgres when my Windows crashed. I
    Installed a fresh copy on Windows on another disk, and then Postgres on
    top of it. Then I started the system from the new Windows, stopped the
    Postgres service and copied the data directory from the old system to
    the new one, but Postgres service refused to start.

    So it was not some kind of a backup copy, it was a regular directory of
    another installation.

    Any ideas?

    Thanks,

    Berislav

    (end of broadcast)
    TIP 6: explain analyze is your friend
  • No.4 | | 985 bytes | |

    Wed, May 31, 2006 at 00:26:02 -0700,
    Berislav Lopac <berislav.lopac (AT) gmail (DOT) comwrote:

    Actually, my situation is like this:

    I had a properly running version of Postgres when my Windows crashed. I
    Installed a fresh copy on Windows on another disk, and then Postgres on
    top of it. Then I started the system from the new Windows, stopped the
    Postgres service and copied the data directory from the old system to
    the new one, but Postgres service refused to start.

    So it was not some kind of a backup copy, it was a regular directory of
    another installation.

    That's pretty much the same thing.
    I think that approach should work.

    Any ideas?

    What do your logs say?

    (end of broadcast)
    TIP 1: if posting/reading through Usenet, please send an appropriate
    subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
    message can get through to the mailing list cleanly

Re: Restoring databases from a different installment on Windows


max 4000 letters.
Your nickname that display:
In order to stop the spam: 7 + 6 =
QUESTION ON "Databases"

EMSDN.COM