Incremental Backup Using pg_basebackup in PostgreSQL 18
In this article, I will show how to create a full backup and an incremental backup using pg_basebackup in PostgreSQL 18. I will then use pg_combinebackup to combine the backups and restore the database. Preparing PostgreSQL First, we need to enable the required parameters in postgresql.conf. Add or modify the following parameters: [postgres @OL8 ~]$ vi / var /lib/pgsql/ 18 /data/postgresql. conf wal_level = replica archive_mode = on archive_command = 'cp "%p" "/archive/%f"' summarize_wal = on The summarize_wal parameter enables WAL summarization, which is required for incremental backups. After changing these parameters, restart PostgreSQL: [postgres@OL8 ~]$ /usr/pgsql-18/bin/pg_ctl -D /var/lib/pgsql/18/data -l logfile restart waiting for server to shut down.... done server stopped waiting for server to start.... done server started Creating Backup Directories Next, create separate directories for the full and incremental backups: [ root@OL8 ~ ] #...