Greetings,
* Christopher Pereira (kripper@imatronix.cl) wrote:
> Our stream replication slave server got out of sync so we need to base
> backup again.
If you do WAL archiving instead of depending on the WAL to exist on the
primary then a replica can catch up using WAL. Having a WAL archive
also means you can do point-in-time-recovery for any point.
> In case of big databases, can we do incremental backups with pg_basebackup?
pg_basebackup doesn't support incremental backups, though there's been
discussion of adding some kind of support for it, check -hackers if
you're curious.
> Is there any alternative?
There's a few different alternatives for PG backup software, some of
which support incremental backups and restores. I'm personally involved
with pgbackrest- https://pgbackrest.org though there's other options out
there also (wal-g, barman, and more).
Thanks,
Stephen