Restore Snapshot (zeysdk snapshot restore)
Revert project to a previous snapshot state.
zeysdk snapshot restore [snapshot-id] [options]
Parameters
| Parameter | Description | Required | Example |
|---|---|---|---|
snapshot-id | ID of snapshot to restore | ❌ | 20231101-123456 |
Options
| Option | Description | Default |
|---|---|---|
--dir <directory> | Target directory | Current directory |
-f, --force | Skip confirmation | false |
Examples
# Restore specific snapshot
zeysdk snapshot restore 20231101-123456
# Output: Do you want to restore this snapshot? (Y/n)
# Restoring snapshot...
# Snapshot restored successfully.
# Force restore without confirmation
zeysdk snapshot restore 20231101-123456 -f
# Output: Restoring snapshot...
# Snapshot restored successfully.
# Restore to different directory
zeysdk snapshot restore 20231101-123456 --dir ./test-env
# Output: Do you want to restore this snapshot? (Y/n)
# Restoring snapshot to ./test-env...
# Snapshot restored successfully.
# Interactive restore (select from list)
zeysdk snapshot restore
# Output: Select a snapshot to restore:
# > 20231101-123456 | Initial setup
# > 20231101-124567 | Release v2.1.0
Warning
⚠️ Restore operation will:
- Overwrite existing files
- Remove additional files
- Cannot be undone