Zum Hauptinhalt springen

Restore Snapshot (zeysdk snapshot restore)

Revert project to a previous snapshot state.

zeysdk snapshot restore [snapshot-id] [options]

Parameters

ParameterDescriptionRequiredExample
snapshot-idID of snapshot to restore20231101-123456

Options

OptionDescriptionDefault
--dir <directory>Target directoryCurrent directory
-f, --forceSkip confirmationfalse

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