CorefinityCorefinityDocs
Open the Control PanelControl Panel
Snapshots and restores · 12 of 14

corestack_snapshot_restore_to

Restore a snapshot elsewhere.

Scope writeAlso destructive to reveal secretsAlso exec to reveal secretsAsks you to confirmRuns as a taskCan return a secret
On this page

When to use it

Restore a snapshot somewhere other than the row it was taken of: into a new environment of a website, over another existing environment, over production, or into a new website. Preview it first with corestack_restore_preview, which also tells you the confirmation to type. To restore a snapshot onto its own row, use corestack_restore_create.

The answer is a task that follows the restore: read it with corestack_restore_get, and the copy's steps with corestack_operation_timeline_get. An overwrite takes a safety snapshot first, so it can be undone. A new environment is born with an HTTP-auth login: it opens in the person's browser, or with reveal_to_agent it is returned to you (needs exec); corestack_http_auth_reveal_password shows it again later.

When the snapshot's PHP version is not open to new sites yet (just after a PHP security update, before its tested release is opened), a restore to a new environment or a new site is not refused: it keeps the snapshot's versions, so it waits for that version (version_wait with kind php) and goes on by itself once it is open. If by then the copy can no longer be made as planned, it keeps waiting with the status "Waiting for our team to prepare the copy"; it is never failed. corestack_restore_preview answers the same way. The snapshot cannot be deleted until the restore has finished.

Ask for it

Prompt
Using the Corefinity MCP server, call corestack_snapshot_restore_to with snapshot_id 812, target {"kind":"existing_environment","site_id":311}, scope database. (Restore a snapshot elsewhere.) Tell me what it returned.

Inputs

anonymiseboolean

Anonymise the copy. Never for production.

confirm_domainstringConfirmation

For production, its domain, typed exactly. Restoring over production needs the destructive scope. Up to 253 characters.

confirm_namestringConfirmation

For existing_environment, the environment's name, typed exactly. Up to 191 characters.

reveal_to_agentboolean

Return a new environment's HTTP-auth login to you instead of opening it in the person's browser. Needs exec. Defaults to false.

scopestring

For an overwrite, everything (the default), files or database.

everythingfilesdatabase
snapshot_idintegerRequired

The snapshot to restore. At least 1.

targetobjectRequired

As corestack_restore_preview takes it, with kind one of new_environment, existing_environment, production or new_site.

Fields
cluster_idinteger

At least 1.

compute_familystring

Up to 32 characters.

domainstring

Up to 253 characters.

kindstringRequired
new_environmentexisting_environmentproductionnew_site
namestring

Up to 64 characters.

packagestring

Up to 64 characters.

parent_site_idinteger

At least 1.

placementobject
Fields
cluster_idinteger

At least 1.

kindstringRequired
platformcluster
regionstring
productstring
corestackcorecluster
site_idinteger

At least 1.

slugstring
tierstring

Up to 32 characters.

uat_sizestring

Up to 16 characters.

A creating target takes neither confirmation. A new website is a create, which a token with pins cannot start; a new environment needs a pin on its whole website.

Your assistant fills in a confirmation only after you agree.

Example call

tools/call
{
  "name": "corestack_snapshot_restore_to",
  "arguments": {
    "snapshot_id": 812,
    "target": {
      "kind": "existing_environment",
      "site_id": 311
    },
    "scope": "database",
    "confirm_name": "Staging"
  }
}

If it is refused

ReasonWhat to do
confirm_mismatchWhat was typed does not match; the refusal names the argument. Nothing was started.
anonymise_productionProduction is never anonymised.
copy_target_staging_onlyThis website's copies are for staging only and cannot replace production.
legacy_searchThe snapshot is of a site whose search runs on a temporary older engine, so it is not restored into production or a new website. Tell the person to switch the store to the OpenSearch module first; restoring into a staging environment is still allowed.
snapshot_unavailablefinal_expired, mariadb_change, target_too_small, cross_region, anonymise_unsupported, not_offered, not_permitted, commerce_keys_required, busy: this restore cannot be made as asked now; the message says why. not_offered with "This WordPress site is built with Bedrock, so it can only be copied to a site that deploys the same way. For a staging copy, use a branch (Git) environment.": the snapshot is of a WordPress site built with Bedrock that deploys from Git and the target deploys manually (a new environment or website always does); restore only the database (scope database), or use a branch (Git) environment.
snapshot_transferOver an existing environment or production that runs on other servers than the row the snapshot was taken from, the restore would copy the snapshot across, which a saved snapshot is not for now. corestack_restore_preview lists it first. Tell the person they can copy the live environment instead (corestack_site_clone without snapshot_id), or restore the snapshot to an environment on the same servers. Nothing was started. Where it is switched on and both servers can, a saved snapshot on other servers is sent to the target's servers first instead, and the restore then runs as usual (it takes longer: the send is part of it). snapshot_transfer stays for a snapshot the servers cannot send.
runtime_unpreparedThe destination environment needs a platform update before it can take this restore; nothing was changed. Tell the person to contact Corefinity support to update it; retrying cannot help.
feature_offRestoring this way, onto a new website, from a deleted row or with anonymising, is not switched on for the company.
temporarily_unavailableThe restore cannot be made just now. Nothing was changed; try again in a few minutes.
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.
rate_limitedThe person has started as many restores this minute (10 by default), or the company this hour (30 by default), as the limits allow, shared with the Control Panel and the API. A restore that is refused does not count. Wait retry_after_seconds, then call again.
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.
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