Christopher Browne cbbrowne at ca.afilias.info
Thu Mar 27 07:24:41 PDT 2008
Alex Haugg <haugg at comdasys.com> writes:
> i have a tiny problem,
>
> i need a db dump command without slony configurations (without:
> slony_cluster, slony functions and without slony trigger).
>
> thanks for your answer,

If it is acceptable to do this in two parts, there are two tools that
can be used:

1.  tools/slony1_extract_schema.sh is a script that extracts the user
schema for a Slony-I node in the original state with all the
Slony-I-related "cruft" removed.

You could run that against the "master" node, and that will give you a
suitable schema.

2.  You could subsequently run "pg_dump --data-only" against a node
(could be any node) and that will give you a dump of all the data.
The dump will include Slony-I-internal "cruft", but since the schema
doesn't have those tables, the data won't load :-)

Ideally, you would split apart the schema from #1 into two pieces:
  - Firstly, all the CREATE TABLE DDL;

  - Then, you would load the data from #2...

  - Finally, you would run the remainder of the schema from #1, to
    create indexes, triggers, and such like.
-- 
let name="cbbrowne" and tld="acm.org" in name ^ "@" ^ tld;;
http://linuxfinances.info/info/oses.html
Why is  it that when  you're driving and  looking for an  address, you
turn down the volume on the radio?


More information about the Slony1-general mailing list