Zum Hauptinhalt springen

Delete Snapshot (zeysdk snapshot delete)

Delete a specific snapshot.

zeysdk snapshot delete <snapshot-id>

Parameters

ParameterDescriptionRequiredExample
snapshot-idID 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

ErrorDescriptionResolution
Not foundInvalid snapshot IDCheck snapshot list
Access deniedPermission issueCheck file permissions
Corrupt snapshotFile integrity issueCreate new snapshot

Best Practices

  1. Regular Snapshots

    • Before major changes
    • After stable releases
    • During development milestones
  2. Meaningful Comments

    • Describe changes
    • Note important updates
    • Reference related tasks
  3. Maintenance

    • Remove old snapshots
    • Verify restores work
    • Keep comments updated

Common Workflows

  1. 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"
  1. 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
  1. Maintenance
# List snapshots
zeysdk snapshot list

# Clean old snapshots
zeysdk snapshot delete 20230901-123456

# Create maintenance snapshot
zeysdk snapshot create "Post-maintenance 2023-11"