How do I properly back up my AppSheet app?

In a nutshell, what is best practice for backing up an app?

In detail:

I can copy the app - and save the copy with a name like …_prod_backup_YYYYMMNN … but the copy resides in the same Google account as the production app. Google confirmed (six years ago, mind you) that if you delete your Google account they cannot restore your deleted app.

  1. Therefore, how do I export an app definition from within AppSheet into anywhere else - whether cloud backup or download to my PC?

My app connects to two data sources: BigQuery; AppSheet DB. Each source properly stores data that is configuration information for AppSheet itself. BigQuery additionally stores (in a different dataset) business data that is reported upon. Backing up BigQuery business data is outside the scope of backing up the app. Backing up app config data that I’m storing in a BigQuery dataset is outside the scope of AppSheet’s own responsibility - I will handle that.

However, backing up the AppSheet DB database is within the scope of AppSheet and so falls under my question also.

When I copy the app, the dialogue box presents an option to “Make a copy of the data for the new app”. I enable this option but this does not duplicate the AppSheet DB. That dialogue box contains no link to help documentation to explain that option. Searching these forums yields multiple threads where people say the AppSheet DB is buggy, that option is buggy, the copy of the database can take hours and is asynchronous, the copy of the database can fail, etc, etc, etc, so…

  1. Where is Google’s documentation to explain the purpose of the option “Make a copy of the data for the new app”?

  2. If the above option has nothing to do with the AppSheet DB database (as it seems for me), then how do I duplicate the AppSheet DB and download it so the backup persists outside the Google account - to defend against loss of the production system and all backups in the event of account compromise?

Option 1: Download to MS Excel using Google Apps Script: You could use a Google Apps Script to download your AppSheet database data to say an MS Excel. The script could take care of each table one by one.

Option 2 : Download to MS Excel using AppSheet automation: In one of the apps that I maintain, I take daily backup using AppSheet automation and downloading the data to an MS Excel file. The app is medium sized , uses Google sheets as a backend and has a few thousand ( 2K to 10 K) records in each table. The single template contains expressions for all tables in the app - one template in each of MS Excel file’s tab. So if 5 tables, 5 MS Excel tabs in the template file, each tab having the respective table’s << START >> << End >> and associated column expressions.

  1. My observations with AppSheet Database: In the recent past, while updating certain AppSheet database table’s columns for multiple records through automation or GAS, I have observed that the script or automation can time out after say 200-500 records. Somehow ASDB is slow at processing each record. So you may need to iterate the GAS runs multiple times , each run processing say 200-500 records. Of course you can write the GAS itself to iterate after processing 200-500 records in a run and need not do it manually.

However this entire process can take a long time if your ASDB has very substantial data.