Live data from Hacker News

Smaller is better – The rise, fall, and rise of flat file software

wilcosky.com

151–152 of 152 posts

Re: Smaller is better – The rise, fall, and rise of flat file software

#151
post #143

Earlier quoted context omitted.

If you're running Postgres in Docker, you can just stop the container and tar up the data volume and start it somewhere else (This also works without Docker of course, but Docker makes me feel safer when I do stuff like this)

Does this work even when the Postgres is updated to a newer version? This would make me want to use docker as well.

I'd have to read the Postgres docs to be sure. Postgres has really good docs.

My intuition is that you're expected to do some kind of migration or export/import, because the on-disk format probably changes between major versions.

Re: Smaller is better – The rise, fall, and rise of flat file software

#152
post #43

Earlier quoted context omitted.

If you're running Postgres in Docker, you can just stop the container and tar up the data volume and start it somewhere else (This also works without Docker of course, but Docker makes me feel safer when I do stuff like this)

Why does Docker makes you feel safer here? Is it because you feel more confident there is no database process still running?

It's more about, I don't like having a global directory namespace that everything gets dumped into.

I know that PG data is usually in /var/lib/postgresql/data, but I like Docker because if I ever need a 2nd or 3rd database on one system, I can give them more meaningful names and not feel like I'm touching Important System-Wide Stuff.

Post reply on HN