Skip to main content

Data Management

The Data Management feature can be used to import, export, or transfer data. Data Management is CLI-based only, but is partly configured in the admin panel.

Identity Card of the Feature

Plan: Free feature.
Role & permission: Minimum "Access the transfer tokens settings page" permission in Roles > Settings - Transfer tokens.
Activation: Available and activated if a transfer salt is defined.
Environment: Available in both Development & Production environment.

Configuration

Some configuration options for the Data Management feature are available in the admin panel, and some are handled via your Strapi project's code.

Admin panel settings

Prerequisites

A transfer.token.salt should be defined in the config/admin configuration file (see code-based configuration).

Transfer tokens allow users to authorize the strapi transfer CLI command (see Developer Documentation). Administrators can manage API tokens from Settings icon Settings > Global settings > Transfer Tokens.

Transfer tokensTransfer tokens

The Transfer Tokens settings sub-section displays a table listing all of the created Transfer tokens.

The table displays each Transfer token's name, description, date of creation, and date of last use. From the table, administrators can also:

  • Click on the edit button to edit a transfer token's name, description, or type, or regenerate the token.
  • Click on the delete button to delete a Transfer token.

Creating a new transfer token

To create a new Transfer token:

  1. Click on the Create new Transfer Token button.

  2. In the Transfer token edition interface, configure the new Transfer token:

    Setting nameInstructions
    NameWrite the name of the Transfer token.
    Description(optional) Write a description for the Transfer token.
    Token durationChoose a token duration: 7 days, 30 days, 90 days, or Unlimited.
    Token typeChoose a token type:
    • Push to allow transfers from local to remote instances only,
    • Pull to allow transfers from remote to local instances only,
    • or Full Access to allow both types of transfer.
  3. Click on the Save button. The new Transfer token will be displayed at the top of the interface, along with a copy button copy button.

    Custom Transfer TokenCustom Transfer Token
Caution

For security reasons, Transfer tokens are only shown right after they have been created. When refreshing the page or navigating elsewhere in the admin panel, the newly created Transfer token will be hidden and will not be displayed again.

Regenerating a Transfer token

To regenerate an Transfer token:

  1. Click on the Transfer token's edit button.
  2. Click on the Regenerate button.
  3. Click on the Regenerate button to confirm in the dialog.
  4. Copy the new Transfer token displayed at the top of the interface.

Code-based configuration

A transfer.token.salt value must be defined in the config/admin file so that transfer tokens can be properly generated. If no value is defined, the feature will be disabled. The salt can be any long string, and for increased security, it's best to add it to the environment variables and import it using the env() utility as in the following example:

/config/admin.js
module.exports = ({ env }) => ({
// …
transfer: {
token: {
salt: env('TRANSFER_TOKEN_SALT', 'anotherRandomLongString'),
}
},
});

Usage

The Data Management system is CLI-based only, meaning any import, export, or transfer command must be executed from the terminal. Exhaustive documentation for each command is accessible from the following pages: