Zum Hauptinhalt springen
Markdown anzeigen

Snapshot Management

The Snapshot Management commands help you create, manage, and restore backups of your ZeyOS applications.

Available Commands​

CommandDescriptionUsage
listList available snapshotszeysdk snapshot list
createCreate new snapshotzeysdk snapshot create [COMMENT]
restoreRestore from snapshotzeysdk snapshot restore [SNAPSHOT_ID]
deleteDelete snapshotzeysdk snapshot delete <SNAPSHOT_ID>

Process

  1. Snapshot Creation

    • Archives non-hidden project entries plus the supported .zeysdk manifest files
    • Stores snapshot metadata with comment and timestamp
    • Saves the completed ZIP and metadata in .zeysdk/snapshots
  2. Snapshot Management

    • Lists available snapshots with ID, comment, and date
    • Supports restore and delete actions from the interactive list
    • Lets you restore a selected snapshot by ID
  3. Snapshot Restore

    • Confirms before replacing local files unless forced
    • Validates and extracts the archive into a sibling staging directory before touching the target
    • Preserves the target's root .zeysdk contents, then overlays .zeysdk/assets.json and .zeysdk/package.json when the snapshot contains them
    • Swaps the staged tree into place and rolls the original directory back if the commit step fails

Common Workflows

Bash
zeysdk snapshot create "Before payment changes"
zeysdk snapshot list
zeysdk snapshot restore 20231101-123456
zeysdk snapshot delete 20231101-123456

Notes

  • snapshot is a meta command; use zeysdk snapshot list, create, restore, or delete
  • Snapshot IDs use timestamp-style names such as 20231101-123456; same-second collisions add -1, -2, and so on
  • Snapshot IDs accepted by restore/delete are constrained to safe filenames and cannot contain directory separators
  • Create snapshots before major changes to a current-format project; separately preserve legacy hidden metadata before migration
  • Use bundles when you need to install multiple applications to an instance