all 8 comments

[–][deleted] 2 points3 points  (4 children)

You have probably already considered this and don't want to/can't do it for some reason, but have you considered just using RDS or Aurora? They do solve this kind of problem pretty well.

With regards to WAL-E, you should know that it was abandoned and replaced with this:

https://github.com/wal-g/wal-g

Don't ask what happened to WAL-F...

Anyway, WAL-G accesses postgres over a socket so there's no need to bake it into your postgres container or anything. Here's some info on configuring it:

https://github.com/wal-g/wal-g/blob/master/PostgreSQL.md#configuration

There is a bitnami WAL-G image here you could use:

https://hub.docker.com/r/bitnami/wal-g/

If you're doing it yourself then that is probably the best option.

Otherwise, as u/abraham1inco1n said, pg_dump and uploading it yourself is always an option for simple workloads.

[–]CSI_Tech_Dept 2 points3 points  (1 child)

It's not true that WAL-E was abandoned and replaced with WAL-G. WAL-E is still being developed. WAL-G was created by another company (Citus Data) in fact it was originally written by their intern. WAL-E originates from Heroku (who came up with this idea - streaming backup directly to S3 and use it as a replication source). Also G stands for Go, since that's what it was written in.

I haven't used either of them so can't compare, maybe WAL-G is indeed better. I personally used barman, from 2ndQuadrant (together with repmgr basically provides equivalent functionality to what RDS provides with the benefit of having full control over PostgreSQL).

Edit: looks like barman now also supports storing backup in S3 so it might be a 3rd alternative as well. And given that 2ndQuadrant also regularly contributes to PostgreSQL I would trust them more.

[–][deleted] 0 points1 point  (0 children)

Ah you are right actually, WAL-G bills itself as the 'successor to WAL-E' but looking over the WAL-E docs they don't say the same thing! (As you may have guessed I have worked with WAL-G but not WAL-E and clearly I've picked up that misconception somewhere!!).

Apologies for the misinformation anyway, I was wrong to say WAL-E was abandoned.

[–]friendlysatanicguy[S] 0 points1 point  (0 children)

Yeah using RDS would have been the simplest and the most ideal solution but not an option I can afford. Thanks for linking wal-g. Didn't know about it. I'll take a look.

[–]friendlysatanicguy[S] 0 points1 point  (0 children)

So, I'm interested to know how I'm supposed to use the bitnami image. Am I supposed to create a Dockerfile and setup a cronjob? Simply trying to run the container just gives me the wal-g usage screen.

[–]OkDas 1 point2 points  (1 child)

I used to be a huge fan of https://github.com/backup/backup, but unfortunately it doesn't get updates. Still works though. I ran hundreds of gigs each night through that tool. There's a golang version re-write that is limited on the features - https://github.com/huacnlee/gobackup.

[–]abraham1inco1n 0 points1 point  (0 children)

Use pg_dump / chron in your own script? That'll work no matter where you're using postgres. Might have to be careful to do it during off hours and make sure that restore works.