Skip to content

Migration Assistant: overview

If your team runs more than one Capell site, you move pages or a whole site between them in the admin. An import there goes through a review before anything is written.

You build a package file from a page or a whole site with a command, copy it across, and upload it in the admin under Import Pages or Import Sites. The review lists every page in the file. Where an address already exists on the target site, you choose what happens to that page. Layouts and images are matched to those already on the target, and you choose what happens to the rest. After a validation step you type a confirmation phrase and the import is queued.

The writing happens in background jobs, which your host or developer must have running. Before it writes, it checks again that the person who started the import is still allowed to. With Publishing Studio installed, imports land in a draft workspace you name.

Two commands undo an import. One lists the records it created, the other removes those nobody has edited since, and a preview run shows the result first. Each import then appears in the Import Sessions list in the admin with its status.

Migration Assistant imports a Capell page or site archive into this Capell installation. It stages the archive as an import session, lets you review proposed page and relation decisions, validates the plan, then queues the import for execution.

Run the package migrations and keep a queue worker listening to the migration-assistant queue (or the connection and queue configured with MIGRATOR_QUEUE_CONNECTION and MIGRATOR_QUEUE). An import job can run for up to 15 minutes and tries three times, with one- and five-minute backoffs.

Keep Laravel’s scheduler running. migration-assistant:reclaim-stale runs every ten minutes and requeues Running sessions that have not updated for 30 minutes by default. This recovers an interrupted worker; it does not reverse any records already written.

Completion and failure notifications are queued and encrypted. They go to the initiating user and any roles configured for that outcome, through the configured channels (mail and database by default). Keep both the queue worker and the selected notification channels operational if operators rely on those alerts.

Open Recovery Center → Import pages or Import sites. Upload a ZIP archive, enter a required workspace name, and optionally add a note. After the archive is read, work through the wizard in order:

  1. Review the proposed page decisions.
  2. Resolve imported relations when the wizard surfaces them. If no relation decisions are needed, it moves directly to validation.
  3. Validate the plan and resolve any blocking errors.
  4. Enter the required confirmation text when shown, then dispatch the import.

Dispatching queues the work; it does not complete the import in the browser. The wizard shows the queued/running/completed/failed status and links to the imported workspace when one is available.

The worker reopens the archive and rechecks its integrity, unresolved references, the initiating account, page.import permission, target, and current site access immediately before writing. Removing the account, permission, or site assignment while an import is queued therefore makes the session fail closed. Updating an existing shared relation additionally requires page.import.update-shared-relations.

Uploaded archives are size- and integrity-checked. Defaults allow 1 MB metadata JSON entries, 5 MB payload JSON entries, 50 MB media files, and 250 MB total uncompressed package data. Media is verified by SHA-256 and an existing media record is reused only when its checksum and stored file are usable. These controls reduce import risk, but do not replace reviewing the source and taking a backup.

Open System → Import Sessions to filter sessions by kind, status, or initiating user. This resource is restricted to global administrators with import-session.view; it is not site-scoped. Open a session to inspect its timeline, validation report, result summary, page decisions, relation decisions, and manifest. A failed session also shows its failure reason.

If a Running or Queued session has become stale, the list may show Recover stale imports. This includes a queue handoff interrupted by broker failure or process death. Recovery renews the session’s enqueue lease before redispatching; execution still rechecks the initiating actor’s permissions and site access. This action does not roll back completed imported content.

An operator with import-session.cancel can cancel a Draft, Parsed, Mapped, Validated, or Queued session. Cancellation does not stop a Running job. A failed session shows Retry only to an operator with import-session.retry and only while the source archive and stored decisions still make that session retriable. If a standard page or site archive attempt created records, execute its rollback first: retry remains blocked until every recorded creation was deleted or was already missing, and stays blocked when rollback skips an edited record. Otherwise start a new import from the original archive.

A successful import creates a signed rollback report listing records that the execution report says it created. Rollback is a CLI-only recovery operation; there is no rollback button on the Import Session screen. Against a current backup, first inspect it with migration-assistant:rollback-report <session-id-or-uuid>, then use migration-assistant:rollback-execute <session-id-or-uuid> --actor=<user-id> --dry-run to preview the deletions.

Only then run migration-assistant:rollback-execute again without --dry-run. The named actor must still be active, hold import-session.rollback for every affected site, retain the relevant site assignments, and be allowed to delete each record. The command rejects a tampered report, deletes unchanged created records in reverse order, skips missing or subsequently changed records, and writes an audit row for every attempt.

This is not a database restore. It only considers records captured as created by the import; it does not promise to undo edits to reused records, later editorial changes, published copies, external side effects, or backups. Review the report’s manual instructions and the dry-run skips before proceeding.

Session manifests, decisions, resolution maps, validation/results, archive paths, target URLs, failure reasons, and most rollback details are encrypted at rest. Rollback provenance and its signature remain readable so they can be verified. Import archives and content can still contain personal or confidential data, so restrict the configured disk, working directories, queue payloads, notifications, logs, and backups.

The standard queued executor deletes its staged upload after successful completion. Failed and partial imports retain the archive so operators can retry or recover them; partial imports that created models also retain signed rollback evidence. Do not treat Migration Assistant as long-term archive storage. Run migration-assistant:prune to preview retention and report stored archive bytes, eligible sessions and reclaimable bytes. No files or records are deleted unless you pass --prune; --json provides a structured report. migration-assistant.retention.days defaults to 30 days, measured from the last session update. Terminal sessions older than this period, their source archives, rollback reports and rollback audit rows are removed together. Imported content is never deleted by retention.

Active imports and unresolved recoveries are excluded, including partial writes without a rollback report and rollback skips for edited records. On the session screen, global administrators with import-session.view and import-session.legal-hold can place or release a legal hold covering the session, archive and all recovery evidence. Holds last until released; releasing a hold does not restart the retention period. Missing archives are tolerated. Failed archive deletions retain the database evidence for retry and return a failing command exit code. Shared archives, paths outside the import directory and legacy working directories are retained for manual review. Storage totals cover referenced archive files on the configured disk, excluding database size, backups and unreferenced uploads. There is no automatic retention schedule; operators must explicitly invoke pruning.

  • Import pages and sites are separate entry points, but use the same review, resolution, validation, and queued-execution model.
  • The default page target writes to the live database. A draft workspace requires a target resolver supplied by Publishing Studio or another integration; check that resolver before importing. page.import.publish-live is reserved for downstream integrations and is not enforced as an extra publishing gate by this wizard.
  • Review every proposed decision and create a backup before importing. Migration Assistant does not make an archive safe to import merely because it is a ZIP file.

For how to use Migration Assistant, see the admin guide. For developers: see the README.