The first time an internal app matters is the first time someone asks you to put yesterday back.
A bad import. A status change that should not have happened. A laptop that had the only copy of the database because “SQLite is just a file.” A deploy that came up empty because the file lived on a disk Azure was free to replace. None of those are exotic failures. They are Tuesday.
I like simple stacks. I have argued for SQLite when it is enough and for Azure without the ceremony. Simplicity does not mean skipping the part where you can get the data back.
## Decide What “Back” Means
Before you pick a tool, write down the loss you are willing to accept.
For a lot of internal apps, losing the last hour is painful and losing the last month is unacceptable. For a nightly batch that can be rebuilt from the source system, yesterday is fine. For an approval history the auditors will ask about, you want point-in-time copies and a retention period someone in the business agreed to.
That sentence is the backup policy. “We have backups” is not.
## The Database Is Not the Whole App
A restore that brings back rows and loses the attachments is a half rescue. So is a restore that brings back the database and none of the secrets required to boot.
I keep three buckets separate:
- The database. The system of record. This is the one you test.
- Uploaded files. PDFs, photos, signed forms. If they live next to the database, they need the same habit. If they live in blob storage, that storage needs its own retention story.
- Configuration. Entra app IDs, Key Vault references, the publish profile. Secrets belong in Key Vault, not in the database backup and not in a zip someone emailed themselves.
Code is already in git. If the only copy of a business rule is a row in a settings table, that row is data. Back it up with the database.
## SQLite Is a File Until It Is Not
Copying app.db while the process is writing can hand you a file that opens and then lies. SQLite has a backup API for this. The .backup command in the sqlite3 shell uses it. So do small libraries that snapshot a consistent file without asking you to shut the app down for an hour.
A consistent copy, on a schedule, stored somewhere that is not the same disk as the app: that is the whole design for most internal tools. Nightly is a reasonable start. If the business cannot lose a day of approvals, do it more often, or move to a database that already has point-in-time restore and stop pretending the file copy is a strategy.
Keep more than one copy. Last night, last week, and one monthly is enough to survive both “we deleted the wrong plant” and “the backup job has been failing since March and nobody noticed.” Check that the job ran. A green calendar invite is not monitoring.
## Azure Local Disk Is Temporary
This is the mistake I see when a SQLite app moves to Azure Web Apps. The site comes up. The database file sits in the app’s local storage. It works until the platform moves the app, scales it, or replaces the instance. Then the file is gone, or you have two instances that do not share it.
Local disk on an app service is a place for temp files and build output. It is not a system of record. If you are staying on SQLite, put the file on storage that survives a restart and is included in the backup you actually restore. If more than one instance needs to write, SQLite is no longer the simple choice. That is one of the honest reasons to move to PostgreSQL or Azure SQL, not a fashion reason.
Managed databases cost more than a file. They also come with backups you do not have to invent. For a forty-person app that is the business’s system of record, that trade is often the right one. For a tool you can rebuild from a nightly snapshot, the file is still fine. Know which one you built.
## Practice the Restore on a Quiet Day
A backup you have never restored is a story you tell yourself.
Once a quarter, take a copy and bring it up somewhere that is not production. A laptop is fine. A staging slot is fine. Confirm the app boots, a user can sign in, and a record you expect is actually there. Open an attachment. Read an audit row. If the schema has moved since that backup was taken, make sure you know whether you are restoring the database to match the old code or migrating it forward.
Write down the steps the first time you succeed. Future you, on a bad afternoon, will not remember which environment variable points at the file.
## Restores and Audit Trails
Putting the database back does not undo the fact that people kept working. If you restore over production, you can erase legitimate changes that happened after the snapshot.
For a small internal app, I would rather restore beside production and copy back the specific records that were damaged. Audit history helps here. If you logged who changed what, you can see the window you are trying to undo instead of rolling the whole company back to Thursday.
Tell the people who use the app. A silent restore is how you get two versions of the truth and a hallway argument about which one counts.
## Final Thought
You do not need a disaster-recovery program with a binder and a conference bridge to take this seriously. You need a consistent copy of the data, stored off the machine that can fail, and proof that you can open it.
Internal apps earn trust by being the record. A record you cannot put back is just another spreadsheet that happened to have a login page.