Alex Lai <alai(at)sesda2(dot)com> wrote:
> Fujii Masao wrote:
>> What about using rsync to take a base backup from new master and
>> load it onto old master? rsync can reduce the backup time by
>> sending only differences between those two servers.
> My postgres instance has two databases. The pg_dump size is about
> 30GB size. Rsync the entire $PGDATA take about an hour to a empty
> directory. When I rsync the $PGDATA to the existing directory, it
> still take 50 minutes. It seems to me that rsync still spend most
> of the time checking any changes even with very little changes.
> Maybe I miss some option when using rsync can speed up the update.
If the bottleneck is the network, be sure that you are using a
daemon on the remote side; otherwise you do drag all the data over
the wire for any file which doesn't have an identical timestamp and
size. An example of how to do that from the rsync man page:
rsync -av -e "ssh -l ssh-user" rsync-user(at)host::module /dest
This will try to identify matching portions of files and avoid
sending them over the wire.
In response to
pgsql-admin by date
|Next:||From: Kevin Grittner||Date: 2011-11-07 17:16:06|
|Subject: Re: pg_dump from 8.4 to 8.3|
|Previous:||From: Kieren Scott||Date: 2011-11-07 16:54:01|
|Subject: pg_dump from 8.4 to 8.3|