[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] database replication with bucardo

From: Slappinjohn
Subject: Re: [Gnumed-devel] database replication with bucardo
Date: Sat, 18 Aug 2012 13:19:13 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20120624 Icedove/10.0.5

> can you describe the other solution. I would like to put something in
the blog and in the wiki

as Karsten suggested in the first place, I did the diff-patch-workaround:

As far as I won't need access on both places this will work quite well.

on the first PC I run this script as root:


cd /home/marc/gnumed/backups

pg_dump -C -v -U gm-dbo -f new.sql gnumed_v17 2>/dev/null

diff old.sql new.sql > diff.sql

su marc -c "scp -P 10022 diff.sql

mv new.sql old.sql

on the remote side (or via ssh in the same script, however you like it):


cd /home/marc/gnumed/backups

patch old.sql diff.sql

cp old.sql /tmp/

su postgres -c "psql -c 'drop database gnumed_v17;'"

su postgres -c "psql < /tmp/old.sql"

gm-adjust_db_settings gnumed_v17

/etc/init.d/postgresql reload

Will have a look at Postgres-XC as Dave suggested



reply via email to

[Prev in Thread] Current Thread [Next in Thread]