Both back up PG's WAL files (Write Ahead Log) and allow restoring your database state as it was at a specific time or after a specific transaction committed. This is known as point-in-time recovery (PITR) [0]
Users and admins make mistakes, and accidentally delete or overwrite data. With PITR you can restore in a new environment, just before the mistake occurred and recover the data from there.
[0] https://www.postgresql.org/docs/9.6/static/continuous-archiv...
However it might be interesting to stream WAL logs to e.g. AWS Kinesis....
I'm afraid to use a lot of storage for WAL segments that are mostly empty:
16 MB per segment x 60 minutes x 24 hours x 7 days = 161 GB/week
Does WAL-G/WAL-E compression help?
On a staging server with little activity, the compressed WAL-E wal files go as low as 1.9MB per 10 minutes. (~2GB/week)
The production server has files between 4 and 12MB per 1 minute or less. (~220GB/week)
WAL-E has a good `wal-e delete retain` command that removes older base backups and wal files.
Also, what an impressive project to have on the resume as a college intern. I don't think many interns get to tackle something so meaningful.
I'd say the differences between WAL-G and Barman are similar to WAL-E and Barman, which comes up relatively frequently. https://news.ycombinator.com/item?id=13573481
In summary, WAL-E is simpler program all around that focuses on cloud storage, barman does more around inventories of backups and file-based backups and configuring Postgres. There are integrative downsides to its span. WAL-E also happens to predate Barman.
is google cloud storage on the roadmap?
Minio has an interesting feature where it can be a "gateway" to other cloud storage. Google Cloud Storage is one of their specific examples:
https://docs.minio.io/docs/minio-gateway-for-gcs
So WAL-G would talk to Minio, and Minio would transparently proxy that to GCS.
I assume I am switching from WAL-E to WAL-G for more perf. But WAL-E speaks GCS. If WAL-G needs an extra hop to do so, may lose some of the point of it..
That being said, the Minio team seem pretty good with writing performance optimised code. Frank Wessels (on Minio team), has been writing articles about Go assembler and other Go optimisation things recently. eg:
• https://blog.minio.io/accelerating-blake2b-by-4x-using-simd-...
• https://blog.minio.io/golang-internals-part-2-nice-benefits-...
So the performance impact might not be such a problem. :)
Disclosure: I work on Google Cloud (so I'd love to see this tool point at GCS).
We're going to start rolling it out for Forks/point-in-time recoveries first, which present less risk to start. Later we'll explore either parallel restores from WAL-E and WAL-G or possibly just flip the switch based on the results.
On restoration there's really no risk to data. Further we page our on call for any issues that happen such as WAL not progressing, or servers not coming online out of restore.
For now, since I'm also on GCP, I'm using PGHoard: https://github.com/ohmu/pghoard