Re: Re. Backup

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Sushil Shirodkar <sushilps(at)hotmail(dot)com>, "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Re. Backup
Date: 2023-08-03 19:01:05
Message-ID: dbb641c11b5fd71c9f24ee886853dcea556ea027.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, 2023-08-03 at 17:20 +0000, Sushil Shirodkar wrote:
> We take regular backup along with WALs everyday no issues, but one day of
> the week regularly backup fails with the following error.
>
> ERROR:  requested WAL segment 0000000C000008A10000000B has already been removed
>
> We know the reason there is heavy database activity going during this period. But
> trying to avoid addition of more WAL files, is there any way to modify our backup
> command below which will take just the snapshot and not worry about the WALs? 
> playing with diff. options but no luck.  
>
> pg_basebackup -h ${MASTER_TCP_ADDRESS} -U ${REP_USER} -D ${BACKUP_DIR} -X fetch -Ft -zPw >>$LOG

You need the WAL, otherwise you cannot recover the backup.

Use "-X stream" instead of "-X fetch", and the problem will go away.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

In response to

  • Re. Backup at 2023-08-03 17:20:43 from Sushil Shirodkar

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Roland Che 2023-08-03 19:42:12 Re: Re. Backup
Previous Message Joseph Hammerman 2023-08-03 17:54:36 Instrumenting stale replication slots