Re: PostgreSQL (file based) database restore - Mailing list pgsql-general

From Joshua D. Drake
Subject Re: PostgreSQL (file based) database restore
Date
Msg-id 4437F2D5.6020102@commandprompt.com
Whole thread Raw
In response to PostgreSQL (file based) database restore  ("Bit Byter" <takashi_949@hotmail.com>)
List pgsql-general
Bit Byter wrote:
> I just did a file based database backup (stopped postmaster and
> zipped/copied all files under /usr/local/pgsql/data/* to a differnt
> location)
>
> How can I 'restore' the database and start using it?

Assuming you are using linux/unix you can use pg_ctl (read the docs) to
start the new database using the copy structure.

There are a couple of assumptions that I am making for you:

1. You actually copied/archived the files correctly.

2. You have insured that the permissions are correct for the user that
will be calling pg_ctl.

3. You didn't make the backups while the database was running.

Lastly... don't do this. Use pg_dump/pg_restore.

Sincerely,

Joshua D. Drake


--

             === The PostgreSQL Company: Command Prompt, Inc. ===
       Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
       Providing the most comprehensive  PostgreSQL solutions since 1997
                      http://www.commandprompt.com/



pgsql-general by date:

Previous
From: User Roman
Date:
Subject: Re: Postgres Library natively available for Mac OSX Intel?
Next
From: "Joshua D. Drake"
Date:
Subject: LW Boston