From: | Brent Wood <b(dot)wood(at)niwa(dot)co(dot)nz> |
---|---|
To: | Jerry LeVan <jerry(dot)levan(at)eku(dot)edu> |
Cc: | Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Pushing result set to table on different machine? |
Date: | 2005-09-13 22:17:04 |
Message-ID: | 20050914100823.K85834@storm-user.niwa.co.nz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 13 Sep 2005, Jerry LeVan wrote:
> Hi,
> I recently added a linux/windows laptop to our home network.
>
> I have started Postgresql (8.0.3) on the laptop and have
> "replicated" my main database on the laptop. (pg_dump,
> ftp and pg-"undump").
>
> I would like to keep them reasonably in sync. Slony is
> overkill and I think the "mirror" contrib is possibly
> overkill also.
>
> I have installed the dblink package and can easily "pull"
> data from my main server back to the laptop.
>
> Is there a elegant way to "push" the data from the main
> server to the laptop?
I have not tried this with Postgres, but have done similar things with
other databases and related packages.
In the Postgres case, a script on the server which remotely runs a command
on the laptop (ssh/rexec/rsh as you prefer) could run a
copy from table (on the server) | copy to table from stdin (remotely on
the laptop)
Something to empty tables first might help, but any command can be set up
to run on the laptop, but be invoked from the server. Data from a srever
run command can, as above, be piped as input to a command run by the
laptop (but started from/by the server)
I don't know that I'd recommend it, but you may be able to rsynch the
database directory.
Set up the script & run it on the server whenever you want.
Brent Wood
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2005-09-13 23:21:04 | Re: Replication |
Previous Message | Scott Marlowe | 2005-09-13 22:04:33 | Re: Question about PHP and PostgreSQL |