Richard Martin's Blog

Tag: postgresql replication

Replicating PostgreSQL – the easy way – with rubyrep

by Richard Martin on Aug.01, 2009, under Linux admin, PostgreSQL

I’m a great fan of Bucardo for PostgreSQL replication…. it’s stable but quite hard to use…. if you want fire and (not) forget replication try RubyRep…. awesome.  The documentation is perfect but to make it even easier, if you are testing and messing around… uninstall, then re-scan, then replicate otherwise you might get some bizarre replication errors, or foreign key contraint issues etc… anything odd, just un-install, then re-scan and replicate.  It really is full proof… well it worked for me!

For the cut & paste brigade: (RTFM)

rubyrep generate myrubyrep.conf

rubyrep scan -c myrubyrep.conf

nohup rubyrep replicate -c myrubyrep.conf &

Remember the nohup and the &, to background it, unless you’re actually at the console of the production server – which you probably aren’t….  In fact stick the nohup and & on the scan command too as that could take a few hours on a big DB…

Then tail -f nohup.out to watch the (lack) of output, output is normally bad – loss of connection:

2009-07-31T22:22:13+01:00 Exception caught: no connection to ‘right’ database

and what not… but rubyrep will just keep going once the connection comes back up.  Perfect!

Leave a Comment : more...

Real time replication for linux and PostgreSQL

by Richard Martin on Jan.16, 2009, under Linux admin, PostgreSQL

I’ve been playing with this for years.  Nothing works without major work – OK I’m lazy.  Now I can spend $500 and get pretty good replication for my linux servers, single windows server, and all the code, stuff and my precious PostgreSQL databases – at last.  I love Bucardo for great FREE replication and now I know how it works I’ll be using all over the place but if you want an easy life and good sleep check out R1 software

Boy, it’s made my life a lot easier…….

unless you don’t backup your CDP linux backup software database….. and then you lose ALL your backups…. so if you use CDP backup software backup your /usr/r1soft directly ALL the time…. if that directory gets corrupted – you’re screwed….

Leave a Comment : more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

Archives

All entries, chronologically...