CorefinityCorefinityDocs
Open the Control PanelControl Panel
Database · 3 of 12

corestack_db_import

Import into the database.

Scope execAlso destructive to reveal secretsAsks you to confirmRuns as a taskNo secrets returned
On this page

When to use it

Import a SQL dump (plain, gzip or zstd) into the environment's database, from an uploaded transfer or a file under the site root. A safety snapshot is taken first (always on production) and named in the result: restore it with corestack_restore_create if the import goes wrong. The sanitiser removes DEFINER clauses and statements the site user may not run; pass sanitise: false to send the dump unchanged. Once the data is in, the site's cache is flushed (cache_flushed in the result; when it is false, the data is still imported: flush it yourself as cache_flush says).

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_db_import with site_id 4211, transfer_id 2207, drop_existing_tables false. (Import into the database.) Tell me what it returned.

Inputs

confirm_domainstringConfirmation

The site's domain, typed exactly, to import on production. Up to 253 characters.

drop_existing_tablesboolean

Defaults to false.

pathstring

Relative to the site root, or absolute under it. Up to 1,024 characters.

safety_snapshotboolean

Defaults to true.

sanitiseboolean

Defaults to true.

site_idintegerRequired

At least 1.

transfer_idinteger

At least 1.

Your assistant fills in a confirmation only after you agree.

Example call

tools/call
{
  "name": "corestack_db_import",
  "arguments": {
    "site_id": 4211,
    "transfer_id": 2207,
    "drop_existing_tables": false
  }
}

If it is refused

ReasonWhat to do
import_runningAnother import into the same database is running or holds the reserved import slot (taken under the environment-row lock before any safety snapshot); wait for it.
snapshot_failedcorestack_db_import's safety snapshot failed; nothing was changed; retry once; then tell the person.
transfer_changedThe transfer's object is not the generation recorded for it, or yields more bytes than its scan did; nothing was written; upload again.
checksum_mismatchThe transfer's bytes do not match its declared sha256; nothing was written; upload again.
transfer_expiringThe transfer has less life left than mcp.transfers.min_consume_seconds, so the run could outlive its object; upload it again, then call again.
sanitise_unparsedThe SQL-aware sanitiser met a construct it cannot close; details names the byte offset; stopped before that statement reached mariadb; fix the dump, or call again with sanitise: false.
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