Re: backing up the data from a single table?

From: Hans Schou <hans(dot)schou(at)gmail(dot)com>
To: stan <stanb(at)panix(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: backing up the data from a single table?
Date: 2019-09-13 14:39:06
Message-ID: CAApBw365KHmTWFdTajcYUqayCDoM-T85_di3179Ac9Y1bNd3TQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Sep 13, 2019 at 4:14 PM stan <stanb(at)panix(dot)com> wrote:

> Is there a way to "export" a single table, that can be easily re
> "imported"?
>

Export:

pg_dump --table=foo > foo.sql

Import:

cat foo.sql | psql

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Olivier Gautherot 2019-09-13 14:44:01 Re: backing up the data from a single table?
Previous Message Ron 2019-09-13 14:35:06 Re: PG SQL and LIKE clause