Skip to main content

Data environments

A data environment is a separate data set within the same installation, with its own content, files, and search. Administrators, settings, and languages are shared by all environments.

Environments are managed on the Data environments tab in Settings. Until you create one, all work happens in the main environment (Main), and the tab shows "No environments created: all work happens in the main one."

Permissions​

Any administrator can see the list of environments. Only an administrator with the Managing environments permission (environments.manage) can create and delete environments and markers, issue marker tokens, and transfer data. Without it, the tab has no creation forms, no delete buttons, and no Bulk transfer block.

Transferring to the main environment requires a separate permission, Transfer to the main environment (environments.transferToPublic).

Create an environment​

In the Create environment card, fill in the fields and click Create environment:

  • Environment name: the environment's name. Use lowercase Latin letters, digits, and single underscores between them, up to 40 characters, starting with a letter. The names public and information_schema, and names starting with pg_, are reserved. You can't change the name after creation.
  • Description: an optional description.

If the name isn't valid, the reason appears under the field.

The new environment appears in the table with the Environment name, Description, and Status columns. While the environment is being deployed, its status is deploying; it then changes to ready or failed. A failed status has a hint with the reason. While an environment is being deleted, its status is deleting. Statuses update on their own, so you don't need to reload the page.

Switch environments​

Once the project has at least one environment with the ready status, an environment switcher appears in the header. Its list contains the main environment (Main) and the environments with the ready status. When an environment other than the main one is open, the header shows a Data environment badge with its name. The selected environment is remembered and opens the next time you sign in.

If the open environment has been deleted or is unavailable, the main environment opens and a warning tells you so.

App tokens belong to an environment: a new environment starts with an empty token list.

Delete an environment​

Click the delete icon in the environment's row. In the confirmation dialog, type the environment name in To confirm, enter the environment name and click Delete. The Delete button becomes available only when the name matches exactly. You can also delete an environment with the failed status.

danger

Deletion is permanent: the environment's content, files, and search indexes are lost for good. The environment's markers are deleted along with it.

Environment markers​

The Environment markers block below the environments table appears once the project has at least one environment. To create a marker, use the Create marker card: enter the marker value (Marker), select the environment (Marker environment), and click Create marker.

A marker is a permanent environment name for a client. The client sends the x-environment-marker header with the marker value instead of the x-environment header with the environment name. You can re-point a marker to another environment, and every client that sends it switches automatically, with no changes to its settings.

  • A marker points to one environment; an environment can have any number of markers.
  • The marker value (Marker) uses lowercase Latin letters, digits, hyphens, and underscores, up to 64 characters. It can't be changed after creation: to rename a marker, delete it and create it again.
  • The marker's environment (Marker environment) is selected from the list in the marker's row. Changing it here switches every client that sends this marker.
  • Once a marker is deleted, clients that send it start getting denied.

For the Content API, a marker client needs a marker token: the App tokens button in the marker's row opens its token list, and Issue token creates a new one. Only administrators with the Managing environments permission see the App tokens button. The client sends the marker token in x-app-token together with x-environment-marker. An environment token works only in its own environment, so after the marker is re-pointed, such a client is denied.

Transfer between environments​

Transfers are available to an administrator with the Managing environments permission once the project has at least one environment with the ready status. The target can be any ready environment except the current one. The main environment is listed only if you have the Transfer to the main environment permission.

To transfer a single record, use the Transfer to environment action in its row in a section table (pages, products, blocks, forms, menus, filters, discounts, integration collections).

The Bulk transfer block on the Data environments tab moves entities from several sections to another environment in a single run. Select the entities, click Transfer selected, choose the Target environment, and click Show plan. The plan shows what will happen to each entity and changes nothing by itself. Dependencies (templates, attribute sets, statuses) are added to the plan automatically. For duplicates in the target environment, the Skip, Replace, and Merge actions are available; a duplicate with no action selected isn't transferred. If an entity was edited in the target environment after the last transfer, it isn't transferred unless you check Overwrite; when it's overwritten, a version snapshot is kept. To overwrite such edits in the main environment, type public to confirm. For integration collections, items are transferred only if Transfer collection items is checked. The What the transfer does not carry block lists what won't reach the target environment; you'll need to create those items there yourself.

The transfer starts only when you click Transfer. It can't be undone: the only way back is a reverse transfer.