تخطَّ إلى المحتوى

nself promote

هذا المحتوى غير متوفر بلغتك بعد.

Promote one environment to another (e.g. staging to prod).

nself promote <source> <target> [flags]
nself promote rollback [flags]

nself promote moves configurations, migrations, and services from one environment to another. The most common path is staging → prod, but any source-to-target pair is allowed. Use --dry-run first to preview what would change without writing anything.

Production promotions are gated: a target of prod requires --confirm prod and an --approve-id (a ticket or change-management ID). Before applying, the command snapshots the current state into a backup tag so the operation is reversible. If the promotion fails, the message includes the rollback command with the snapshot tag.

nself promote rollback reverts to the most recent pre-promotion backup, or to a specific tag with --tag. Rollback is itself logged for audit.

NameDescription
rollbackRollback to pre-promotion backup
FlagDefaultDescription
--dry-runfalsePreview changes without applying
--approve-id""Approval ticket ID (required for non-dry-run)
--confirm""Confirmation target (required value prod for prod target)
--jsonfalseJSON output
FlagDefaultDescription
--tag""Specific backup tag to restore (default: latest pre-promote)
Terminal window
# Preview a staging-to-prod promotion
nself promote staging prod --dry-run
# Apply the promotion with explicit approval
nself promote staging prod --approve-id TICKET-1234 --confirm prod
# Roll back the most recent promotion
nself promote rollback
# Roll back to a specific snapshot tag
nself promote rollback --tag pre-promote-2026-04-17T03:00Z

Commands | Home