﻿# A SQLite connection backup does not bundle every attached database

A practical investigation of a SQLite connection backup does not bundle every attached database, with explicit observations, control cases and evidence limits.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/field-sovereign-sqlite-backup-named-attached-authorization-database/
Language: en

## The deployment scenario

A private retrieval application uses one SQLite connection with a document catalog and an attached authorization database. Its backup task copies the connection’s default database and calls the result a complete application backup. After restoration, document rows are present but the companion access state is absent or stale. The relevant question is which named database the backup operation selected, not whether a connection object could query both during normal operation.

## The data and control mechanism

Python Connection.backup exposes a source database name with main as its default. SQLite’s backup API likewise identifies source and destination databases explicitly. A connection can provide access to multiple databases without turning one named backup into a bundle of all attachments. Copy completion for the selected source does not establish collection of every application dependency or a synchronized cross-database recovery point.

## Define the intended boundary

Define the application recovery set as actual database identities and required companion artifacts. Identify which database holds access decisions, removal state or other gates needed before recovered documents may be served. Keep source selection separate from destination connection naming. If backups are acquired separately, state the intended consistency or reconciliation contract rather than assuming that sequential successful copies represent one application-wide atomic snapshot.

## A step-by-step review

First inspect attached database names and the backup call’s selected source. Use disposable databases with distinct catalog and authorization markers to compare a default backup with an explicitly selected companion backup. Restore into an isolated environment and verify the required identities and relationships. Keep the serving gate closed when a companion is missing, rather than silently inventing permissive defaults that make a catalog-only restore appear functional.

## Evidence required for acceptance

Acceptance evidence includes the source name, artifact identity, completion outcome and recovery check for every required component. A negative fixture should reveal a missing authorization database even when document queries succeed. Preserve the reconciliation decision for separately acquired states and the evidence that access enforcement is active before serving resumes. File existence and a successful catalog query are insufficient to establish a complete private application recovery.

## Failure cases and limits

This protocol does not prescribe a universal multi-database snapshot method or prove that every SQLite attachment needs to be backed up identically. Some state may be reconstructible under an explicit contract. The limitation is the scope of the selected backup, not SQLite’s ability to copy that database correctly. The bounded result is a truthful application recovery manifest, without treating main as an implicit collection of every database accessible through the original connection.

## Primary references and related reading

Record the selected source database and restore every required companion separately; default main does not mean the whole application. [Python SQLite backup selected database name](https://docs.python.org/3/library/sqlite3.html); [SQLite backup API source and destination database selection](https://www.sqlite.org/backup.html).

The proposed investigation of sqlite backup named attached authorization database is a proposed technical boundary review; no production workload or private data was used. Related reading: [Continue MCP working directory determines relative resource paths](/journal/guide-continue-mcp-working-directory/); [Retain decryption dependencies for an encrypted etcd restore](/journal/guide-dc-encrypted-etcd-restore-keys/).
