What's wrong with WAL backup? Postgres can run your script and pass it path to newly created WAL chunk, that you can ship off anywhere.
Or run `pg_start_backup`, rsync data directory, `pg_stop_backup`.
What's wrong with WAL backup? Postgres can run your script and pass it path to newly created WAL chunk, that you can ship off anywhere.
Or run `pg_start_backup`, rsync data directory, `pg_stop_backup`.
However there might be a lot of WAL to apply, as data gets added then deleted or changed.
A differential backup (see Note) solves this somewhat for large databases by just backing up the blocks changed since the last full backup.
So you might do a full backup once a week, and differentials nightly in between and also save the WAL. This means you are not backing up many TBs every night.
To recover, you would restore the full backup, plus the last differential backup plus any WAL since the last differential. This reduces the volume of WAL to be applied in a recovery.
Note :
Differential backups would include all the changes since the last FULL backup.
Incremental backups would include changes since the last backup, whether a full or the last incremental.
I use PG for 10 years and I never needed incremental backups. But if someone asked me about it then I would respond that the PG has no incremental backups.
So WAL backup is not well known or documented in my opinion. An average db admin needs a tool which will generate incremental backup as a single file named like dbname_20160926.sql
If you think backup tools are a minus for PG, I guess you've never used barman. Easy as pie and has saved my bacon several times when CASCADE DELETE wrecked a few dbs for me due to coworkers futzing around.
You are right, I've never used barman. But I have streaming replication configured manually. Generally I am quite happy with PG backup tools.
However this discussion made me to think about pg_dump deficiencies. WAL backup is for whole db cluster. But how do I incrementally update one db? E.g. one prod db to my dev environment.
What? It is the standard backup method clearly explained in the docs.