Re: PostgreSQL (file based) database restore

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Bit Byter <takashi_949(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PostgreSQL (file based) database restore
Date: 2006-04-08 17:28:53
Message-ID: 4437F2D5.6020102@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message User Roman 2006-04-08 17:30:37 Re: Postgres Library natively available for Mac OSX Intel?
Previous Message User Roman 2006-04-08 16:37:37 Re: pgAdmin3 question