Download and Upload Anvil Apps

Hey Anvil Team, hope your Wednesday is going well!

I’d like some kind of way to upload and download anvil apps, using a single file type, not using git.

This includes the data tables, IDE preferences and settings, code for dependencies, not just the pointers to the dependencies.

1 Like

Are you thinking as a sort of backup and restore mechanism?

Yes. A single upload and download for every single thing in the app.

I know other people have suggested using various separate methods to backup various parts of the app, such as the data tables, and the code itself, but that isn’t what I want.

Imagine a being in Microsoft Word and having to manually save the text in one way, the formatting in another. It would be a pain, and I don’t want to do it.

Yes, it is a pain. And while I don’t have an answer, yet, I can at least suggest (to Anvil) a file format: SQLite.

  1. Anvil tables would map naturally to SQLite tables. After the download/backup, one could readily query the tables – and, if need be, update them, before upload/restore.
  2. SQLite defines an archival format, SQLAR, similar to .zip format, that maps nicely to files on disk. The archive is an additional table, which can coexist in the same database file as the tables.
  3. An index/ToC/manifest (covering the entire contents) has a natural place: an additional table.

Edit: I should add, SQLite’s command-line utility is all one needs in order to query and update the file. That makes it amenable to automation, e.g., via batch file or Python.

1 Like

I’d far rather have a psql dump file so I get an exact copy - I could even build the restore into amoni if it were available

I didn’t realize that the source code tree was stored in PostgreSQL.

For anyone using PostgreSQL, e.g., the standalone edition of Anvil, that would certainly be a boon.

It isn’t. Bit I’d far rather use pgsql for any backup format than some other dbms. That’s what I’d have to restore it to.

But it does make me think I could add a command to amoni to fetch the data tables content over uplink and populate a local db…

More round tuits required for that job!

1 Like

I might have to buy a 3D printer for all the round tuits I’m going to need…

1 Like