Re: Hot backup in PostgreSQL

2020-10-23 Thread Stephen Frost
Greetings, * Mark Johnson (remi9...@gmail.com) wrote: > User managed backups in PostgreSQL work very similar to what you know from > Oracle. You first place the cluster in backup mode, then copy the database > files, and lastly take the cluster out of backup mode. The first and last > steps are

Re: Hot backup in PostgreSQL

2020-10-22 Thread Mark Johnson
User managed backups in PostgreSQL work very similar to what you know from Oracle. You first place the cluster in backup mode, then copy the database files, and lastly take the cluster out of backup mode. The first and last steps are done using functions pg_start_backup('label',false,false) and

Re: Hot backup in PostgreSQL

2020-10-22 Thread Adam Brusselback
> how to do "hot backup" (copying files) while database running? As others have shown, there are ways to do this with PG's internal tooling (pg_basebackup). However, I would highly recommend you use an external backup tool like pgbackrest [1] to save yourself the pain of implementing things

Re: Hot backup in PostgreSQL

2020-10-22 Thread Sushant Pawar
Hi, If the requirement is to take online backup(hot) backup that can be used to do point in time recovery, you can rely on low-level API functionality mentioned earlier by Paul. If you to be care free about not missing any specific mount point other than default mount point, you can use

Re: Hot backup in PostgreSQL

2020-10-22 Thread Andreas Joseph Krogh
På torsdag 22. oktober 2020 kl. 10:18:12, skrev hubert depesz lubaczewski < dep...@depesz.com >: On Thu, Oct 22, 2020 at 09:45:36AM +0200, W.P. wrote: > > There are many ways to do it. To be able to suggest proper solution we'd > > need to know: > > 1. what is the

Re: Hot backup in PostgreSQL

2020-10-22 Thread hubert depesz lubaczewski
On Thu, Oct 22, 2020 at 09:45:36AM +0200, W.P. wrote: > > There are many ways to do it. To be able to suggest proper solution we'd > > need to know: > > 1. what is the problem with pg_dump? > Time (I guess a bit, but copying files could be done using rsync, so much > faster). Is it *really* too

Re: Hot backup in PostgreSQL

2020-10-22 Thread hubert depesz lubaczewski
On Thu, Oct 22, 2020 at 08:42:08AM +0200, W.P. wrote: > Hi there, > > how to do "hot backup" (copying files) while database running? > > Not using pg_dump. > > Is there some equivalent of Oracle (I knew v8) "ALTER DATABASE BEGIN > BACKUP", which froze writes to database files, pushing

Re: Hot backup in PostgreSQL

2020-10-22 Thread Paul Förster
Hi Laurent, > On 22. Oct, 2020, at 08:42, W.P. wrote: > > Hi there, > > how to do "hot backup" (copying files) while database running? > > Not using pg_dump. > > Is there some equivalent of Oracle (I knew v8) "ALTER DATABASE BEGIN BACKUP", > which froze writes to database files, pushing

Hot backup in PostgreSQL

2020-10-22 Thread W.P.
Hi there, how to do "hot backup" (copying files) while database running? Not using pg_dump. Is there some equivalent of Oracle (I knew v8) "ALTER DATABASE BEGIN BACKUP", which froze writes to database files, pushing everything to redo files? Laurent.