sb-mig
Guides

Artifacts and Audit Trail

Understand the files sb-mig writes during dry runs and real migrations.

Artifacts and audit trail

sb-mig writes local files so migration work can be reviewed after the command exits. Most migration artifacts are written under sbmig/migrations by default.

Stable names

Use --fileName when you want predictable artifact names:

sb-mig migrate content --all \
  --from 12345 \
  --to 12345 \
  --migration migration-name \
  --dry-run \
  --fileName release-2026-06-content

With --fileName release-2026-06-content, files use that sanitized base name and do not get a datestamp suffix. Without --fileName, sb-mig derives the base name from --from and appends a datestamp to migration artifact files.

Standard dry-run files

Dry-run content and preset migrations can write:

dry-run--<name>---story-input-full.json
dry-run--<name>---story-after-full.json
dry-run--<name>---story-to-migrate.json
dry-run--<name>---story-migration-pipeline-summary.json

dry-run--<name>---preset-input-full.json
dry-run--<name>---preset-after-full.json
dry-run--<name>---preset-to-migrate.json
dry-run--<name>---preset-migration-pipeline-summary.json

For stories in a publishing mode, dry runs also write:

dry-run--<name>---language-publish-state-map.json
dry-run--<name>---publication-plan-summary.json

Preserve-layer dry-run files

When --publicationMode preserve-layers is active, sb-mig also previews both draft/current and latest published payloads:

dry-run--<name>---draft-current-input-full.json
dry-run--<name>---draft-current-after-full.json
dry-run--<name>---published-layer-input-full.json
dry-run--<name>---published-layer-after-full.json
dry-run--<name>---published-layer-summary.json

These files are the proof for dirty published stories: they show the migrated published layer that would be published, and the migrated draft/current layer that would be restored afterward.

Real-run files

Real runs write the changed payload and pipeline summary without the dry-run-- prefix:

<name>---story-to-migrate.json
<name>---story-migration-pipeline-summary.json
<name>---language-publish-state-map.json
<name>---story-migration-run-log.jsonl

Preset runs write equivalent preset artifacts:

<name>---preset-to-migrate.json
<name>---preset-migration-pipeline-summary.json
<name>---preset-migration-run-log.jsonl

preserve-layers real runs also write the draft/current and published-layer files without the dry-run-- prefix.

Run logs

Real runs write JSONL records after Storyblok write attempts complete. Event types include:

EventMeaning
update_successStory or preset update succeeded.
update_failedStory or preset update failed.
publish_successStory language publish succeeded.
publish_failedStory language publish failed.
publish_skippedPublish was skipped because source state should not publish.
migration_write_summaryFinal per-run write summary.

Dry runs return before Storyblok writes, so they do not create JSONL run logs.

Pre-migration backups

For real runs with --migrate-from space, sb-mig writes source backups before writing migrated content:

sbmig/backup/story/before__<name>*.sb.stories.json
sbmig/backup/preset/before__<name>*.sb.presets.json

revert content also creates a target-space backup before restoring:

<target-space>--backup-before-revert.sb.stories

Inspection outputs

language-publish-state writes a reusable publish-state JSON file:

sbmig/language-publish-state/<name>.json

published-layer-export writes:

<name>---draft-current-full.json
<name>---published-layer-full.json
<name>---dual-layer-summary.json

story-versions --outputPath writes exactly to the path you pass.

inspect component-usage --outputPath writes exactly to the path you pass:

sbmig/usage/flex-group-width-child.json

The report contains query metadata, filters, totals, and one row per component usage match. Without --outputPath, inspect component-usage only prints a console summary.

On this page