Some databases also have the ability to be instantly portable, like a sqlite file.
You can tar up your flat files as well, but that is a separate process and can be time consuming for larger directories.
Perhaps there is a use case for a file system backed by portable database like sqlite, such that you can just mount the volume and send it around without pain, but can prefer to use normal command line utils (ls, rm, grep, etc) instead of interacting via SQL.
I’ve had this research paper on my reading list for a while (but haven’t gotten to reading the full thing)[1]. Not necessarily just a file system but It lays out an entire operating system backed by a database and OS state interactions are done through SQL.
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.
If you're an ignorant fool such as myself, your knowledge of a database's internals is sufficient only to inspire fear. With Docker I know that whatever black magic the database uses is contained within a black box I can copy wholesale. Anything important must be in there, since I didn't give it anything else!
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.
You can tar up your flat files as well, but that is a separate process and can be time consuming for larger directories.
Perhaps there is a use case for a file system backed by portable database like sqlite, such that you can just mount the volume and send it around without pain, but can prefer to use normal command line utils (ls, rm, grep, etc) instead of interacting via SQL.