Local App Server - DataTables data persistence location?

A bit of a general question, not exactly a “code” problem; I just cannot seem to locate an answer within the docs or through experimentation.

Context: I have fumbled my way through setting up the appropriate schema for utilising DataTables and adding/modifying/querying/removing data from the in-built database on the local version of the Anvil app server; That is all working perfectly, very happy with that so far.

Question: What I am trying to locate at the moment though, is where the default storage location (Debian Linux distro) is for the data/metadata that supports the database (for the purposes of portability and/or future replication or backup).

I think there is a hidden file called “.anvil-data” or something like that. I belive it is located above the apps folder.

3 Likes

Thanks! That solved my issue. I partly blame my containerisation approach as to how I missed that, but I still face-palmed a little bit there.

Glad you got that sorted! You can find more information about the App Server’s data directory (and configure it to point somewhere else) in the docs:

If you’re containerising, I’d suggest specifying --data-dir to store data in a volume, so you can keep the rest of your container stateless.

1 Like