CorefinityCorefinityDocs
Open the Control PanelControl Panel
Web server rules · 13 of 14

corestack_nginx_backup_guard_set

Switch Corefinity's backup-file rule.

Scope writeRuns as a taskNo secrets returned
On this page

When to use it

Switch Corefinity's backup-file rule on or off for an environment row. While it is on, the row answers 404 for .sql and .sql.gz files anywhere in its web root, so a database dump left there cannot be downloaded. It is on by default; switch it off only for a site that serves such files on purpose. The change applies at once. The current state is the backup_guard key of corestack_nginx_rules_get.

backup_guard in corestack_nginx_rules_get says whether the rule is offered (available), whether the row wants it (enabled), whether its nginx files carry it (applied), whether a change is on its way (pending) and whether the last change was not confirmed (uncertain: it is applied again within a few minutes). WordPress, Laravel, Shopware 5 and Custom PHP rows already block these files through their platform (platform_enforced), so their rule is always on; it is written on Magento 2 and Shopware rows. A started change answers a task on its nginx_backup_guard_change operation; a row that already wants and carries what you ask answers operation: null. The explainer (corestack_nginx_rules_explain) names the rule when it is why a path answers 404.

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_nginx_backup_guard_set with site_id 4211, enabled false. (Switch Corefinity's backup-file rule.) Tell me what it returned.

Inputs

enabledbooleanRequired

true to block backup files, false to let the site serve them.

site_idintegerRequired

The environment row. At least 1.

Example call

tools/call
{
  "name": "corestack_nginx_backup_guard_set",
  "arguments": {
    "site_id": 4211,
    "enabled": false
  }
}

If it is refused

ReasonWhat to do
wrong_platformThe row's platform blocks these files itself, so it cannot be switched off.
not_availableThe rule is not offered yet, so it cannot be switched on.
nginx_rules_lockedCorefinity staff hold this environment's nginx rules.
files_missingThe environment's nginx files are not ready yet, or carry the rule in a form the Control Panel does not write.
busyAnother change runs on the environment.
staleThe row changed while the change was being started; read it again.
managed_elsewhereAnother control panel manages this site, so use that control panel for it. This is refused before anything else about the site, as in the Control Panel and the API. Nothing was done.
invalid_argumentsThe arguments do not match the tool's input schema, or the Control Panel refused a field. Fix the fields named in the answer and call again.
tenant_mismatchThe object does not exist or the token may not see it. Check the id.
scope_requiredThe token lacks a scope this call needs. Open the link in the answer to add it, then call again.
pin_refusedThe grant is limited to chosen clusters, sites or environments, and this call is outside them. Open the link in the answer to widen it.
rate_limitedToo many calls. Wait for the number of seconds the answer names.
temporarily_unavailableThe Control Panel could not answer just now. Nothing was started; try again shortly.
internal_errorSomething went wrong on our side. Quote the trace id to support.

The same task elsewhere

Was this helpful?
Open in ClaudeOpen in ChatGPT