README
1README
2
3
4Christopher Browne, Afilias Canada
5Steve Simms, Technically Sound
6
7The altperl scripts provide an alternate method of managing Slony-I,
8generating slonik scripts and monitoring slon daemons. They support
9an arbitrary number of Slony-I nodes in clusters of various shapes and
10sizes.
11
12To install the scripts, run "make" and "make install" in this
13directory. The files will be installed under the --prefix you passed
14to configure.
15
16Enter a complete description of your cluster configuration (both nodes
17and sets) in slon_tools.conf. The provided slon_tools.conf-sample
18contains documentation about each of the available options.
19
20If you want to support multiple clusters, you can create multiple
21slon_tools.conf files and specify which one to use in any of the
22scripts by passing the --config option.
23
24
25For the impatient: Steps to get started
26---------------------------------------
27
281. From the top-level source directory:
29
30 ./configure --prefix=/usr/local/slony --with-perltools
31 make
32 make install
33
342. Dump the schema from one database to another:
35
36 pg_dump --schema-only --host=server1 source_db | psql --host=server2 dest_db
37
383. Modify /usr/local/slony/etc/slon_tools.conf to reflect your setup.
39
404. Initialize the Slony-I cluster:
41
42 /usr/local/slony/bin/slonik_init_cluster
43
44 Verify that the output looks reasonable, then run:
45
46 /usr/local/slony/bin/slonik_init_cluster | /usr/local/pgsql/bin/slonik
47
485. Start up slon daemons for both servers:
49
50 /usr/local/slony/bin/slon_start node1
51 /usr/local/slony/bin/slon_start node2
52
536. Set up set 1 on the "master" node:
54
55 /usr/local/slony/bin/slonik_create_set set1
56
577. Subscribe node 2 to set 1:
58
59 /usr/local/slony/bin/slonik_subscribe_set set1 node2
60
61After some period of time (from a few seconds to a few days depending
62on the size of the set), you should have a working replica of the
63tables in set 1 on node 2.
64
65
66Alternate Configuration Method
67------------------------------
68
69The slon_tools.conf file is interpreted by Perl, so you could modify
70it to query a database to determine the configuration. (Beware of
71chicken-and-egg scenarios in doing this, however!)
72
73
74For More Information
75--------------------
76
77There are numerous other scripts for maintaining a Slony cluster. To
78learn more about any of them, run "tool_name --help".
79
80See also the Slony-I administration guide in the doc directory.
81