-
In case it's useful to anyone, I've been running the cheapest possible implementation of Git-based revision history for my blog's PostgreSQL database for a few years now.
I run a GitHub Actions workflow every two hours which grabs the latest snapshot of the database, writes the key tables out as newline-delimited JSON and commits them to a Git repository.
https://github.com/simonw/simonwillisonblog-backup
This gives me a full revision history (1,500+ commits at this point) for all of my content and I didn't have to do anything extra in my PostgreSQL or Django app to get it.
If you need version tracking for audit purposes or to give you the ability to manually revert a mistake, and you're dealing with tens-of-thousands of rows, I think this is actually a pretty solid simple way to get that.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
neon
Neon: Serverless Postgres. We separated storage and compute to offer autoscaling, code-like database branching, and scale to zero.
Neon does something like this I believe. They allow you to "branch" your databases: https://neon.tech
-
Aquameta has an interesting extension that something like this in a different way: https://github.com/aquametalabs/aquameta/tree/master/extensi....
-
There's an interesting approach to it that works with Rails and PostgreSQL using triggers.
https://github.com/palkan/logidze
-
temporal_tables
Postgresql temporal_tables extension in PL/pgSQL, without the need for external c extension. (by nearform)
It was reimplemented in pure SQL here https://github.com/nearform/temporal_tables for this purpose
-
pgreplay
pgreplay reads a PostgreSQL log file (*not* a WAL file), extracts the SQL statements and executes them in the same order and relative time against a PostgreSQL database cluster.
pgreplay parses not the WAL Write Ahead Log but the log file: https://github.com/laurenz/pgreplay
From "A PostgreSQL Docker container that automatically upgrades your database" (2023) https://news.ycombinator.com/item?id=36748041 :
pgkit wraps Postgres PITR backup and recovery:
-
-
blog
Subscribe to this repository to receive notifications whenever a new article is published at https://vb-consulting.github.io/ (by vb-consulting)
Related posts
-
WAL-G 3.0.0 – fast disaster recovery for Postgres
-
A PostgreSQL Docker container that automatically upgrades PostgreSQL
-
What are your favourite approaches to keeping on top of Postgres health?
-
Are stupid database questions allowed? If a database is backed up only every hour, do we just lose the unbacked up data within the one hour time frame?
-
Kubernetes postgres backups