Bill Moran
Network Engineer
5849 Forbes Avenue
Pittsburgh, PA 15217
Logo


slony_switchover.sh

In an effort to make slony disasters easier to manage, I wrote a script called slony_switchover.sh

The problems I was trying to solve:

The script doesn't do anything particularly magical, but I feel that it improves things in the following ways:

The script makes several assumptions that I feel are logical. For example, if you want to migrate a database to the server you're working from, and the cluster name is the same as the database name and the user to connect as is "slony", then the following command would do the trick:
slony_switchover.sh -d database_name

Of course, these assumptions don't always hold true, so I designed the script to still be usable. If your cluster is named differnently than the database, the user is "postgres" and you want to move set 4 to node 8, the command line is still pretty simple:
slony_switchover.sh -d database_name -c cluster_name -U postgres -s4 -t8

The script can be downloaded here.

Revision History


All content copyright Collaborative Fusion, Inc. and Bill Moran. All rights reserved.