Anvil: Backing up your work

Dear Friends:

My project consists of three Apps. Two App depend (not on each other but) on the third App (basically a datastore App with DataTable I/O help functions). That’s just a parenthetical note for my more general questions, next.

As I’ve been working on these Apps, I’ve performed git pulls reqularly to back the code up locally to my laptop, just in case. Similarly, but only moments ago, I discovered the ability to do the same via YAML formatted files.

My general question is this:

  • With up-to-date git pulls of the three Apps and/or their equivalent YAML files, would those local assets be enough to, say, recovery my environment if something catastrophic were to happen? For example, could I sign up for a new Anvil account with the same Tier/Plan level, then the git push up and/or upload the YAML files and be okay?

(Note: I imagine there would also be some necessary tweaking too, such as specifing cross App package dependencies, if those aren’t in the backups).

Naturally DataTables would not be in the backups, but one thing at at time. :blush:

This is important for me to understand, so Thank you!

Yes, subject to the cross app dependencies and data tables exceptions you noted. I use a local git repository as a code backup for my projects where I feel a backup of my own is important.

For data table backup, you can use Anvil uplink to create a local SQLite backup. See Backup to SQLite via Uplink for an approach and sample code.

Restoring is another issue, but that would at least give you a backup of the data.

1 Like

Oh wow, that’s a great answer!!! And I wasn’t aware of the DataTable backup option until you drew my attention to it (the SQLite page). :hugs: Thank you very much!