---
title: "Snapshot Management"
description: "Documentation for Snapshot Management in ZeyOS SDK CLI"
canonical_url: "https://www.zeyos.com/sdk/snapshot-management"
markdown_url: "https://www.zeyos.com/ai/guide/sdk/snapshot-management.md"
section: "sdk"
authority: "guide"
language: "en"
source_repository: "zeyos/sdk-v2"
source_path: "docs/snapshot-management/index.md"
source_revision: "a99897af74253b4dc5af6fecb9301cea0ae18e27"
---

# Snapshot Management

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

Available Commands
------------------

| Command | Description | Usage |
|---------|-------------|-------|
| [`list`](https://www.zeyos.com/sdk/snapshot-management/zeysdk-snapshot-list) | List available snapshots | `zeysdk snapshot list` |
| [`create`](https://www.zeyos.com/sdk/snapshot-management/zeysdk-snapshot-create) | Create new snapshot | `zeysdk snapshot create [COMMENT]` |
| [`restore`](https://www.zeyos.com/sdk/snapshot-management/zeysdk-snapshot-restore) | Restore from snapshot | `zeysdk snapshot restore [SNAPSHOT_ID]` |
| [`delete`](https://www.zeyos.com/sdk/snapshot-management/zeysdk-snapshot-delete) | Delete snapshot | `zeysdk 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
