Postgres - recuperate data from files

Posted on 2012-08-20
Last Modified: 2012-09-04
Hi experts, is there a way to recuperate data from postgres if I pull my hard drive out and plug as a slave on another machine?  Which files?
Question by:thready
    LVL 9

    Accepted Solution

    Pick up the whole thing...

    If you have the whole data folder, you have everything you need (as long as architecture is the same). Just try restoring it on another machine before wiping this one out, in case you didn't copy something.

    Just save the data directory to disk. When launching Postgres, set the parameter telling it where the data directory is (see: Or remove original data directory of the fresh installation and place the copy in its place.
    LVL 2

    Expert Comment

    Make sure you use the same postgres version when you swap out the data dirs, I would recommend to just make a backup file in pgadmin and restore it on the new machine.
    LVL 1

    Author Closing Comment

    In the end I couldn't try this out because the MBR was gone on the machine, but it sounds like this would have worked otherwise....

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Suggested Solutions

    Best database to use for Maps is PostgreSQL. This is an open source database. Comes as a package with most Linux OS. For more info visit the following site: ( This requires some add-o…
    Many developers have database experience, but are new to PostgreSQL. It has some truly inspiring capabilities. I have several years' experience with Microsoft's SQL Server. When I began working with MySQL, I wanted a quick-reference to MySQL (htt…
    Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now