Chris Browne cbbrowne at lists.slony.info
Thu Mar 27 11:22:01 PDT 2008
Update of /home/cvsd/slony1/slony1-engine/doc/adminguide
In directory main.slony.info:/tmp/cvs-serv17358

Modified Files:
	faq.sgml 
Log Message:
FAQ addition on dumping Slony-I-less version of data


Index: faq.sgml
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/doc/adminguide/faq.sgml,v
retrieving revision 1.74
retrieving revision 1.75
diff -C2 -d -r1.74 -r1.75
*** faq.sgml	25 Feb 2008 15:37:58 -0000	1.74
--- faq.sgml	27 Mar 2008 18:21:58 -0000	1.75
***************
*** 282,285 ****
--- 282,346 ----
  </qandadiv>
  
+ <qandadiv id="faqhowto"> <title> &slony1; FAQ: How Do I? </title>
+ 
+ <qandaentry>
+ 
+ <question> <para> I need to dump a database
+ <emphasis>without</emphasis> getting &slony1; configuration
+ (<emphasis>e.g.</emphasis> - triggers, functions, and such). </para>
+ </question>
+ 
+ <answer> <para> Up to version 1.2, this is fairly nontrivial,
+ requiring careful choice of nodes, and some moderately heavy
+ <quote>procedure</quote>.   One methodology is as follows:</para>
+ 
+ <itemizedlist>
+ 
+ <listitem><para> First, dump the schema from the node that has the
+ <quote>master</quote> role.  That is the only place, pre-2.0, where
+ you can readily dump the schema using
+ <application>pg_dump</application> and have a consistent schema.  You
+ may use the &slony1; tool <xref linkend="extractschema"> to do
+ this. </para> </listitem>
+ 
+ <listitem><para> Take the resulting schema, which will <emphasis>not</emphasis>
+ include the &slony1;-specific bits, and split it into two pieces:
+ </para>
+ 
+ <itemizedlist>
+ 
+ <listitem><para> Firstly, the portion comprising all of the creations
+ of tables in the schema. </para> </listitem>
+ 
+ <listitem><para> Secondly, the portion consisting of creations of indices, constraints, and triggers. </para> </listitem>
+ 
+ </itemizedlist>
+ 
+ </listitem>
+ 
+ <listitem><para> Pull a data dump, using <command>pg_dump --data-only</command>, of some node of your choice.  It doesn't need to be for the <quote>master</quote> node.  This dump will include the contents of the &slony1;-specific tables; you can discard that, or ignore it.  Since the schema dump didn't contain table definitions for the &slony1; tables, they won't be loaded. </para> </listitem>
+ 
+ <listitem><para> Finally, load the three components in proper order: </para> 
+ <itemizedlist>
+ <listitem><para> Schema (tables) </para> </listitem>
+ <listitem><para> Data dump </para> </listitem>
+ <listitem><para> Remainder of the schema </para> </listitem>
+ </itemizedlist>
+ </listitem>
+ 
+ </itemizedlist>
+ 
+ </answer>
+ 
+ <answer> <para> In &slony1; 2.0, the answer becomes simpler: Just take
+ a <command>pg_dump --exclude-schema=_Cluster</command> against
+ <emphasis>any</emphasis> node.  In 2.0, the schemas are no longer
+ <quote>clobbered</quote> on subscribers, so a straight
+ <application>pg_dump</application> will do what you want.</para>
+ </answer>
+ 
+ </qandaentry>
+ <qandadiv>
+ 
  <qandadiv id="faqconnections"> <title> &slony1; FAQ: Connection Issues </title>
  <qandaentry>



More information about the Slony1-commit mailing list