Remix.run Logo
railorsi 6 days ago

What’s the issue with running Postgres inside a docker container + regular backups? Never had problem and relatively easy to manage.

Biganon 5 days ago | parent | next [-]

Why use a docker container? I run Postgres as is, what would I gain with running it in a container?

Nextgrid 5 days ago | parent [-]

It makes the whole thing is configured in a docker-compose file (or your raw Docker CLI invocation) + the data volume. So as long as you have those two things you can replicate it and move it to other hosts regardless of their distro.

Compare that with using your distro's packaged version where you can have version variations, variations in default config or file path locations, etc.

matt-p 6 days ago | parent | prev [-]

no PITB, but mostly just 'it's hassle' for the application server I literally don't need backups, just automated provisioning/docker container etc. Adding postgres then means I need full backups including PITB because I don't even want to lose an hours data.

doganugurlu 5 days ago | parent [-]

Or use SQLite and your backups are literally a copy of a file.

You can abuse git for it if you really want to cut corners.

vanviegen 5 days ago | parent [-]

Only if you can freeze your application for that long, in which case your statement is true for all non-broken databases.

markusw 4 days ago | parent | next [-]

You can easily do consistent backup on live databases. There’s a backup command and API.

vanviegen 4 days ago | parent [-]

Sure. But then it's not "just a file" copy, like GP said.

wild_egg 5 days ago | parent | prev [-]

It only freezes your application if you've misconfigured it.

vanviegen 4 days ago | parent [-]

If you want to backup your database using just a file copy, you'd better freeze your database if you value your data. Or use a fancy snapshotting filesystem.