Skip to content

Follow-ups from the review of the backup changes - #3741

Merged
pournasserian merged 2 commits into
feature/stabilize-preview-2from
3725-allow-incomplete-media
Nov 30, 2026
Merged

pournasserian merged 2 commits into
feature/stabilize-preview-2from
3725-allow-incomplete-media

Conversation

@pournasserian

@pournasserian pournasserian commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Part of #3724 and #3725, follow-ups from the review of #3734.

What

  • --allow-incomplete-media: fluentcms backup writes the archive when a local original named by the database snapshot is missing or changed, and lists each one as an FCMS3255 warning (the first 10, then a count). Without the flag the backup still fails with FCMS3255 and keeps the previous archive; the error gives the number of affected originals and names the flag. The fluentcms tool passes the flag to the host.
  • Dangling media file links: a file symlink under the media root whose target does not exist is left out instead of refusing the whole backup with a misleading FCMS3254. There is no file to copy and none the archive could replace; an original that names it still fails verification.
  • Verification without a second read: originals named by the snapshot are hashed while they are copied into the archive, so the archive is no longer reopened, inflated and hashed again.
  • Removed docs/superpowers/plans/2026-11-27-preview-stability.md: a working plan, not documentation.
  • docs/backups.md updated for the flag and for dangling links.

Why

With #3734, one lost original (removed by hand, or left by a media purge stopped between deleting the file and its row) made every backup fail, database included, until storage was repaired by hand. A broken link anywhere in the media folder did the same. Verification doubled the backup's IO on large media libraries.

Tests

  • BackupWithAllowIncompleteMediaWritesTheArchiveAndListsTheLostOriginals: refused without the flag, written with the database and the remaining originals with it.
  • ADanglingMediaFileLinkIsLeftOutRatherThanRefused: skipped locally on Windows without the symlink privilege, so it runs only in CI on Linux.
  • ParserTests: the flag is passed through.
  • Locally on Windows: BackupCommandTests 25 passed, 2 skipped (platform/provider); BackupDestinationTests 10 passed, 6 skipped (symlinks); ParserTests 105 passed.

@pournasserian pournasserian changed the title Allow a backup without lost media originals on request Follow-ups from the review of the backup changes Nov 30, 2026
@pournasserian
pournasserian enabled auto-merge (squash) November 30, 2026 17:27
@pournasserian
pournasserian merged commit 1617bb0 into feature/stabilize-preview-2 Nov 30, 2026
4 checks passed
@pournasserian
pournasserian deleted the 3725-allow-incomplete-media branch November 30, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant