rollback_site
Restore a site's previous nginx config from backups, undoing recent changes. Validates config before applying, supports dry-run, and requires confirmation.
Instructions
Undo a config change: replace a site's current nginx config with a backup taken by create_site, update_site, restore_site or a previous rollback_site (see list_site_backups). Defaults to the newest backup, i.e. the config as it was before the last change. The current config is backed up first, so calling this again flips back. Requires confirm:true. Test-renders before keeping the result and leaves the current config in place if nginx -t fails. Does NOT reload nginx - call reload_nginx afterward.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain whose config should be rolled back | |
| confirm | No | Must be true to actually act; false (default) is a dry run | |
| backup_filename | No | A filename from list_site_backups; defaults to the newest backup for this domain |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | ||
| success | Yes | ||
| reload_required | Yes | True on success - nginx has not actually been reloaded yet |