Re: Clone database using rsync? - Mailing list pgsql-general

From Jeff Janes
Subject Re: Clone database using rsync?
Date
Msg-id CAMkU=1x55zMS5_kvOjJES9yK5PtU4tzvUYjD29j+h3aRYSCf-g@mail.gmail.com
Whole thread Raw
In response to Re: Clone database using rsync?  (sparikh <sparikh@carcharging.com>)
List pgsql-general
On Tue, Nov 5, 2013 at 3:49 PM, sparikh <sparikh@carcharging.com> wrote:
Thanks Jeff for your quick response.

I inherited this system and they had cron job which uses pg_dump for back
up. I recently used to rsync to bring back my hot standby when it was out of
sync and offline for few days because of space issue. That is when the
thought that I might be able to use rsync to clone database.

Ah, I see.  Yes, you can't use pg_dump to seed a standby, so if really want to have a pg_dump for backup, then you will need to have two different methods. 

If I understood your reply correctly, you are currently using rsync for both
clone and backup.  Is that correct?

No, I use pg_basebackup and wal archiving/recovery for both backup, and for cloning dev/test servers.  I'm pondering whether I should also take pg_dump occasionally so that I have a platform-independent secondary backup.

But I'm a big fan of practicing your restoration procedure, so if you want to keep using pg_dump as your backup, I think I'd also use that dump to make clones, unless there is a good reason not to.
 
Cheers,

Jeff

pgsql-general by date:

Previous
From: J Smith
Date:
Subject: Errors regarding non-existent files in pg_subtrans
Next
From: Melvin Call
Date:
Subject: Limiting/disallowing changes of certain columns