Database & backups
Where your FocusFlow data lives, how backup and restore work, and how to remove saved copies.
Last updated: October 15, 2026 · Applies to FocusFlow for Windows
Your live database
FocusFlow keeps its active SQLite database on your PC at %USERPROFILE%\.focusflow\focusflow.db. It contains app data such as tasks, focus history, settings, protection rules, and PIN settings. The database is local; FocusFlow does not sync it to a FocusFlow cloud account.
This is the one live database FocusFlow uses. A secondary backup folder is not a second live database and does not mirror every change in real time; it stores separate verified snapshots when backups are created.
The app uses this database while it is running. Do not move or delete focusflow.db while FocusFlow is open.
If database corruption is detected
When FocusFlow opens the database, SQLite checks its integrity. If corruption is detected, FocusFlow first preserves the unreadable database and any WAL/SHM sidecar files, then opens a fresh database. A startup notice explains what happened and its Open Backup & Recovery button takes you to Settings → Backup & Recovery. The app does not automatically restore a snapshot; choose a verified backup and stage the restore yourself. Database integrity is checked during initialization, not continuously while the app is running.
Where backups are stored
- Primary app-data backups:
%USERPROFILE%\.focusflow\backups\. These are database snapshots with matching.sha256and.meta.jsonfiles. - Optional secondary backups: Choose another folder in Settings → Backup & Recovery. Verified snapshots are copied there. It may be on another drive or network location; FocusFlow does not host this as a cloud backup.
- Safety backups: A verified snapshot of the current live database, created immediately before a staged restore is applied. It is separate from the older backup being restored and is kept in the primary backup folder.
- Pre-restore archives: Before replacing the live database, FocusFlow preserves the current
focusflow.dband any active SQLite WAL/SHM files in%USERPROFILE%\.focusflow\backups\restore-archives\, with a verification manifest. If applying the selected backup fails, FocusFlow uses this preserved set to attempt a rollback. Recovery archives remain available in the app for review or manual deletion.
Creating and verifying backups
After the database is ready, FocusFlow checks for a backup at startup and then every six hours. It normally creates one regular automatic backup per day; the six-hour check does not mean six backups per day. To create an extra snapshot, use Back up now in Settings → Backup & Recovery.
You can create a snapshot while FocusFlow is running. FocusFlow asks SQLite to make a consistent copy of the live database, then checks the copy's integrity and SHA-256 hash. A backup is marked Verified only when those checks pass. Unverified or invalid backups cannot be restored through the normal restore flow. The backup list shows each snapshot's creation date and time, and marks the newest one Latest.
Automatic cleanup
FocusFlow keeps up to seven regular primary app-data backups. A successful new backup triggers cleanup only when the regular-backup count is over seven; with one or two regular backups, nothing is deleted. Cleanup removes the oldest regular snapshot or snapshots and their matching hash and metadata files. It is based on age and count, not on which backups are verified.
Safety backups, pre-restore recovery archives, and copies in your secondary folder are not automatically deleted. Removing the selected secondary-folder setting also leaves existing files in that folder untouched.
Restoring a snapshot
- Open Settings → Backup & Recovery and choose a backup marked Verified.
- Review the confirmation and choose Stage restore. The current database keeps running; it is not replaced immediately.
- Quit and reopen FocusFlow. Before applying the restore, FocusFlow creates and verifies a safety backup, then preserves the current database files in a pre-restore archive. If the restored database fails to initialize, FocusFlow attempts to reinstate the preserved files. The safety backup and archive are distinct recovery points; the previous database files remain available after a successful restore too.
Deleting backups
- Safety backups, secondary copies, and preserved restore archives: Use the corresponding delete control in Settings → Backup & Recovery. The app asks for confirmation before removing the selected copy.
- Regular primary backups: The Backup & Recovery screen does not provide a delete button for these; automatic cleanup keeps the newest seven. To remove one manually, quit FocusFlow first, then delete that selected
focusflow_*.dbfile and its matching.sha256and.meta.jsonsidecars from thebackupsfolder. Do not delete files you may need to restore. - Removing a secondary-folder setting: This stops future copies to that folder; it does not delete copies already there.
Deleting a backup is different from deleting the live database. To remove all local FocusFlow data, first uninstall the app, then delete %USERPROFILE%\.focusflow\. This also removes the database, settings, logs, backups, and recovery files and cannot be undone.