Re: restore a dump db from tar file

From: Filip Rembiałkowski <plk(dot)zuber(at)gmail(dot)com>
To: "Alain Roger" <raf(dot)news(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: restore a dump db from tar file
Date: 2008-10-06 10:48:24
Message-ID: 92869e660810060348gc5df37cj9da9f37fb4e54ae7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2008/10/6 Alain Roger <raf(dot)news(at)gmail(dot)com>:
> Hi,
>
> i backup my database "sewe" using a standard process.
> 1. it backups only database and not roles :-( roles are backuped separately.
> 2. backup is a tar file
> 3. backup command is : pg_dump -v -o -U myuser -ci -Ft -f sewe.tar sewe

You know what all these options mean, do you?
http://www.postgresql.org/docs/8.2/static/app-pgdump.html

>
> Question
> how can i restore it now ?

use pg_restore
http://www.postgresql.org/docs/8.2/static/app-pgrestore.html

> could something like that could work on Windows XP ?
> createdb sewe
> gunzip -c sewe.tar | psql sewe

No, it will not work.
Your archive is in "tar" format. gunzip is not needed here.

use something like
pg_restore -d <destination db name> <file name>

HTH

--
Filip Rembiałkowski

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Henry Combrinck 2008-10-06 11:04:07 Looping through cursor row batches
Previous Message Markus Wanner 2008-10-06 09:03:05 Re: [Pkg-postgresql-public] Postgres major version support policy on Debian