Skip to content

Local search · English

    Back up, upgrade and restore safely

    A recoverable backup includes persistent application data, media/digital files, exports and private configuration, especially the existing encryption key. Binary rollback and data rollback are different operations. After a schema migration, an older binary may not understand the new database.

    • Record the current release, database engine, service topology and backup location. Plan a maintenance window and enough private disk space for both old and failed-release data.
    1. For the supported SQLite stopped-copy workflow, stop application writers and dependent workers, then copy the complete persistent data tree and environment using a tool that preserves permissions. Do not copy only a live SQLite main file while ignoring WAL state.

    2. Create a manifest/checksum record and store backups outside the served web root with restricted access. Encrypt offsite copies and verify upload/readback. For PostgreSQL, coordinate a database-native consistent backup with filesystem state; the SQLite stopped-copy algorithm is not a PostgreSQL backup contract.

    3. Restore into a separate empty private directory or isolated database first. Block outbound network/worker side effects so restored credentials cannot send mail, capture payments or provision domains. Check file hashes, database integrity, account/site counts and representative exports.

    4. Build and verify the reviewed candidate, deploy with the fresh backup available, and check both listeners and workers after migration. If rollback is needed, preserve failed-release data and restore the matching old binary, environment and data snapshot deliberately.

    5. Confirm anonymous pages, authenticated access and selected immutable assets after upgrade or restore. Document what happened and retain the required previous release/backup until acceptance is complete.

    • An isolated restore has proven the backup usable, and production checks identify the intended release with preserved data.

    Do not rotate STRUKT_SECRET_KEY during an ordinary upgrade: existing encrypted credentials require the original key. A successful archive upload without a tested decryption/restore is incomplete backup evidence.

    The competitor-improvements release upgrades the platform database to version 16 and retains content schema version 18. Back up the stopped platform/site databases and persistent files with private configuration and the existing server encryption key before activation. New tables hold encrypted MFA enrollment, hashed one-use recovery codes, session metadata and bounded activity. Retain these together; replacing the encryption key without a supported key migration prevents enrolled accounts from verifying MFA.

    Select a recovery binary that understands platform v16 and Store Stage 2A metadata/list snapshots before accepting new writes. An older platform-v15 binary must not be used against the migrated database. Rolling back a binary and restoring older data have different consequences; do not rewind current orders, stock, account security or accepted submissions as a routine code rollback. Scratch retirement preparation supports v14/v15/v16 snapshots and upgrades only its scratch copy. The SQLite-to-PostgreSQL importer copies and verifies the new security tables, but does not transfer operator secrets: preserve the same encryption key separately.

    Implementation and local verification do not activate a production release. Confirm the actual /opt/strukt/current target, compatible recovery artifact and stopped backup as part of the separately authorized deployment procedure.

    Applies to Strukt 0a5495fd6bf0f095b45937f0d6868b4f2a242e48 · 2026-11-16