Storage provider

Local file storage

Local mode keeps generated objects beneath the owner-only Trestle data directory and is the simplest single-node deployment.

Layout

data/
├── trestle.db
├── files/          # generated keys, never client paths
├── backups/
└── webhook.key

Write path

  1. Check quota and bound the incoming body.
  2. Write to a staged owner-only file while hashing.
  3. Commit file metadata and binding.
  4. Atomically rename the staged file to its generated key.

Symlinks are refused. Client filenames such as ../../trestle.db remain inert metadata and cannot select a destination.

Backup and recovery

Trestle backup archives include consistent SQLite state and local file objects. Run restore preflight before an offline restore, and preserve the current data directory as a rollback copy.