Re: File System Restore - Mailing list pgsql-general

From Tim Penhey
Subject Re: File System Restore
Date
Msg-id HOEPLDNJPCIDBMLHJFMIMEIMELAA.tim@penhey.net
Whole thread Raw
In response to Re: File System Restore  ("Scot L. Harris" <webid@cfl.rr.com>)
Responses Re: File System Restore
List pgsql-general
Scot L. Harris wrote:
>
> I just recently upgraded from 7.2.4 to 7.4.2 postgresql.  What I did was
> a pg_dumpall to save my databases.  Then after the upgrade I did a
> pg_restore using the saved dump file.  Worked perfectly for me.
>
> After I installed the new version of postgresql I did a initdb to setup
> the new database cluster then a started postgresql.  After that I ran a
> psql -d template1 -f databasebackupfile.  The databasebackupfile was
> created from the pg_dumpall.  This recreated all my tables and loaded
> the data.
>
> Very easy and clean.
>
> Not sure you can just copy the file systems around like you describe.

This has been a bit of a point of confusion for me.

When do you use pg_restore vs. psql -f dumped.sql?

Thanks
Tim


pgsql-general by date:

Previous
From: Shanmugasundaram Doraisamy
Date:
Subject: Need help with Dead Lock - reg.
Next
From: "Stanislaw Tristan"
Date:
Subject: Limit connections per user