Re: rsync and streaming replication - Mailing list pgsql-admin

From Scott Ribe
Subject Re: rsync and streaming replication
Date
Msg-id 1B7A9CF6-33A8-43CA-9D55-2ED9F0A69CB9@elevated-dev.com
Whole thread Raw
In response to Re: rsync and streaming replication  (Jean-Armel Luce <jaluce06@gmail.com>)
List pgsql-admin
I think there have been two similar threads recently, and I want to be sure I'm not confusing them. So:

- How large is the db? By which I mean how much disk space does the data directory occupy?

- What's the bandwidth of the network connection to the distant slave?

- What's the CPU & disk on each end?

On Nov 14, 2011, at 10:59 AM, Jean-Armel Luce wrote:

> For example, the rsync commands I am using are for data and logs are (I have 2 databases, 1 tablespace per database):
> rsync -a /var/opt/hosting/db/slony/pg_xlog/*
slave-db01.profiles.bench.pns-si.s1.p.fti.net:/var/opt/hosting/db/slony/pg_xlog/
> rsync -a /var/opt/hosting/db/profiles/bench/*
slave-db01.profiles.bench.pns-si.s1.p.fti.net:/var/opt/hosting/db/profiles/bench/
> rsync -a /var/opt/hosting/db/profiles/profiles/*
slave-db01.profiles.bench.pns-si.s1.p.fti.net:/var/opt/hosting/db/profiles/profiles/

Well, there's one error. Your command is rsync'ing each file individually, so of course each file is sync'd. Sync the
directoriesinstead--in other words leave off the * (but not the /) and let rsync decide which files need sync'ing. 


--
Scott Ribe
scott_ribe@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice





pgsql-admin by date:

Previous
From: Scott Ribe
Date:
Subject: Re: rsync and streaming replication
Next
From: Alexander Burbello
Date:
Subject: Restore db