Re: Postgres restore sometimes restores to a point 2 days in the past

2025-01-31 Thread Adrian Klaver
On 1/31/25 13:52, Koen De Groote wrote: > I should have asked earlier what is the archive command The example from the documentation, but with GZIP. So from the documentation: https://www.postgresql.org/docs/16/continuous-archiving.html#BACKUP-ARCHIVING-WAL

Re: Postgres restore sometimes restores to a point 2 days in the past

2025-01-31 Thread Koen De Groote
> I should have asked earlier what is the archive command The example from the documentation, but with GZIP. So from the documentation: https://www.postgresql.org/docs/16/continuous-archiving.html#BACKUP-ARCHIVING-WAL Which becomes this: archive_command = 'test ! -f /mnt/server/archivedir/%f.gz &

Re: Postgres restore sometimes restores to a point 2 days in the past

2025-01-31 Thread Adrian Klaver
On 1/31/25 12:10, Koen De Groote wrote: > What is the complete pg_basebackup command? 2/ All my WAL files are archived and uploaded to the cloud. So, I can just have them downloaded. I should have asked earlier what is the archive command? Are > What is determining that a particular WAL

Re: Postgres restore sometimes restores to a point 2 days in the past

2025-01-31 Thread Koen De Groote
> What is the complete pg_basebackup command? The command: pg_basebackup -h -p -U -D -Ft -z -P -v --wal-method=none So basically the same as the 2nd example here: https://www.postgresql.org/docs/16/app-pgbasebackup.html except for the verbose flag and the wal-method flag. The wal-method is n

Re: Postgres restore sometimes restores to a point 2 days in the past

2025-01-31 Thread Koen De Groote
Any advice on a different mailing list that something like this would be more suited to? Regards, Koen De Groote On Fri, Jan 31, 2025 at 8:38 PM Koen De Groote wrote: > No, it's meant to be an off-site restore, as to do a daily check if the > restore actually works. > > Regards, > Koen De Groot

Re: Postgres restore sometimes restores to a point 2 days in the past

2025-01-31 Thread Koen De Groote
No, it's meant to be an off-site restore, as to do a daily check if the restore actually works. Regards, Koen De Groote On Fri, Jan 31, 2025 at 2:30 PM Laurenz Albe wrote: > On Fri, 2025-01-31 at 10:47 +0100, Koen De Groote wrote: > > I'm running postgres 16.6 > > > > My backup strategy is: bas

Re: Postgres restore sometimes restores to a point 2 days in the past

2025-01-31 Thread Adrian Klaver
On 1/31/25 01:47, Koen De Groote wrote: Comments in line. I'm running postgres 16.6 My backup strategy is: basebackup and WAL archive. These get uploaded to the cloud. The restore is on an isolated machine and is performed daily. It downloads the basebackup, unpacks it, sets a recovery.sig

Re: Postgres restore sometimes restores to a point 2 days in the past

2025-01-31 Thread Laurenz Albe
On Fri, 2025-01-31 at 10:47 +0100, Koen De Groote wrote: > I'm running postgres 16.6 > > My backup strategy is: basebackup and WAL archive. These get uploaded to the > cloud. > > The restore is on an isolated machine and is performed daily. It downloads the > basebackup, unpacks it, sets a recov

Postgres restore sometimes restores to a point 2 days in the past

2025-01-31 Thread Koen De Groote
I'm running postgres 16.6 My backup strategy is: basebackup and WAL archive. These get uploaded to the cloud. The restore is on an isolated machine and is performed daily. It downloads the basebackup, unpacks it, sets a recovery.signal, and a script is provided as restore_command, to download the