Delete Snapshot (zeysdk snapshot delete)
Delete a specific snapshot.
zeysdk snapshot delete <snapshot-id>
Parameters
| Parameter | Description | Required | Example |
|---|---|---|---|
snapshot-id | ID of snapshot to remove | ✔️ | 20231101-123456 |
Examples
# Remove specific snapshot
zeysdk snapshot delete 20231101-123456
# Output: Snapshot 20231101-123456 removed successfully.
# Remove after confirmation
zeysdk snapshot delete 20231101-123456
# Output: Are you sure you want to remove this snapshot? (Y/n)
# Snapshot 20231101-123456 removed successfully.
Error Handling
| Error | Description | Resolution |
|---|---|---|
| Not found | Invalid snapshot ID | Check snapshot list |
| Access denied | Permission issue | Check file permissions |
| Corrupt snapshot | File integrity issue | Create new snapshot |
Best Practices
-
Regular Snapshots
- Before major changes
- After stable releases
- During development milestones
-
Meaningful Comments
- Describe changes
- Note important updates
- Reference related tasks
-
Maintenance
- Remove old snapshots
- Verify restores work
- Keep comments updated
Common Workflows
- Development Cycle
# Start of feature
zeysdk snapshot create "Start: User Authentication"
# After implementation
zeysdk snapshot create "Complete: User Auth v1.0"
# After testing
zeysdk snapshot create "Tested: User Auth v1.0"
- Deployment Process
# Pre-deployment
zeysdk snapshot create "Pre-deploy v2.1.0"
# Post-deployment
zeysdk snapshot create "Production v2.1.0"
# Emergency rollback
zeysdk snapshot restore 20231101-123456 -f
- Maintenance
# List snapshots
zeysdk snapshot list
# Clean old snapshots
zeysdk snapshot delete 20230901-123456
# Create maintenance snapshot
zeysdk snapshot create "Post-maintenance 2023-11"