Thread: Replicate PostgreSQL with rsync

Replicate PostgreSQL with rsync

From
Jérôme Kestener
Date:

Hello

I am trying to replicate a PostgreSQL database with rsync.

Does anyone have a experience with that?

 

Thanks

 

Jérôme Kestener



Jérôme Kestener
4 rue de l'Europe
Sierck les Bains
Tél : 00333 82.83.72.35
GSM: 00336 03.16.86.95



Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Testez le nouveau Yahoo! Mail

Re: Replicate PostgreSQL with rsync

From
Gaetano Mendola
Date:
Jérôme Kestener wrote:

> Hello
>
> I am trying to replicate a PostgreSQL database with rsync.
>
> Does anyone have a experience with that?

No I don't have, but is not a good idea.
if you not stop the service during the mirror....

Regards
Gaetano Mendola



Re: Replicate PostgreSQL with rsync

From
"Sander Steffann"
Date:
Hi,
I am trying to replicate a PostgreSQL database with rsync.

Does anyone have a experience with that?

We wanted to transfer a database to another machine with the minimum amount of downtime. We used rsync to make a copy of the database while PostgreSQL was running. this ofcourse is NOT a consistent copy. Then we shut down the database and we used rsync to copy all the differences from the first machine to the second, to make sure that the second machine had a consistent database.

 

You'll have to shutdown the database to make the final transfer, but you can use rsync to do a lot of work while the database is still running.

 

Good luck,

Sander.