Skip to content

cmd promote

github-actions[bot] edited this page Oct 12, 2026 · 5 revisions

nself promote

Moved to nself deploy promote-env in v1.5.0, removed in v1.6.0. The old spelling keeps working until then.

See cmd-deploy for the current command. Command-Canon lists every move.

Previous content

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

Description

In v1.5, use nself deploy promote <source> <target> for environment promotion. The existing promote spelling reaches the same runner through deploy promote-env, with one deprecation warning per process. See cmd-deploy for the ordered plan, per-platform digest check, verified target backup, and rollback behavior. A prod-tier target requires --yes or terminal confirmation. promote rollback restores the latest promotion record on its target, including the verified target backup. In v1.5, --confirm and --approve-id are ignored. Use --yes or terminal confirmation for a production-class target.

In v1.4, the following legacy behavior remains available:

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.

promote <source> <target>

promote rollback

Examples

# v1.5: preview the canonical promotion plan
NSELF_V15=1 nself deploy promote ls prodsim --dry-run

# v1.5: apply with production confirmation
NSELF_V15=1 nself deploy promote ls prodsim --yes

# v1.5: restore the recorded target artifacts and verified backup
NSELF_V15=1 nself deploy rollback prodsim

# v1.4 legacy examples:
# 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

See Also

← Commands | Home →

Home


Getting Started


Commands


Features


Configuration


Plugins (87 + 10 monitoring)

Free (25)
Pro (62)
Planned (26)
  • plugin-audit
  • plugin-blog
  • plugin-checkout
  • plugin-commerce
  • plugin-drm
  • plugin-export
  • plugin-flow
  • plugin-import
  • plugin-ldap
  • plugin-mailgun
  • plugin-media
  • plugin-oauth-providers
  • plugin-pages
  • plugin-postmark
  • plugin-rate-limit
  • plugin-reports
  • plugin-saml
  • plugin-scheduler
  • plugin-sendgrid
  • plugin-sso
  • plugin-subscription
  • plugin-thumb
  • plugin-transcoder
  • plugin-twilio
  • plugin-waf
  • plugin-watermark

Guides


Architecture


Reference


Machine interface


Licensing


Security


Brand


Operations


Contributing


Admin


Changelog


All commands (21)

Clone this wiki locally