We have an anvil-app-server running locally together with the default Postgres DB.
We would like to perform regular updates of the entire DB without interfering with the running system.
The database has ~10k entries of mainly text (no binary data). What is the recommended way of creating local backups for DBs of that size?
Ideally we would like to serialize the entire DB into a single file using pg_dump or something similar.
Since you have a local installation of PosgreSQL I would just use whatever you like to back up an SQL database of that type, either through the cli with pg_dump like you already stated, or using something more managed, like
Happily, the answer is “pg_dump will work just fine”. Thanks to Postgres’s snapshot isolation, a pg_dump operation doesn’t pause the rest of the database!
Obligatory plug: The Enterprise App Server supports built-in streaming backups to filesystem or cloud storage, and can restore itself to any point in time with one command – all out-of-the-box with no extra setup. If you’re running the App Server in a commercial setting and would benefit from a fully supported option with extra bells and whistles, drop us a line at sales@anvil.works!