Platform.sh User Documentation

Exporting data

Upsun Beta

Access our newest offering - Upsun!

Get your free trial by clicking the link below.

Get your Upsun free trial

As a Platform.sh user, your code and data belong to you. At any time, you can download your site’s data for local development, to back up your data, or to change provider.

Before you begin Anchor to this heading

You need:

1. Download your app’s code Anchor to this heading

Your app’s code is maintained through the Git version control system.

To download your entire app’s code history:

  1. List all your projects by running the following command:

    platform projects
  2. Retrieve the project you want to back up by running the following command:

    platform get PROJECT_ID
  1. In the Console, open your project and click Code .

  2. Click Git.

  3. To copy the command, click Copy. The command is similar to the following:

    git clone abcdefgh1234567@git.eu.platform.sh:abcdefgh1234567.git project-name

2. Download your files Anchor to this heading

Some files might not be stored in Git, such as data your app writes in mounts.

You can download your files using the CLI or using SSH.

3. Download data from services Anchor to this heading

The mechanism for downloading from each service (such as your database) varies.

For services designed to hold non-persistent data, such as Redis or Solr, it’s generally not necessary to download data as it can be rebuilt from the primary data store.

For services designed to hold persistent data, see each service’s page for instructions:

4. Get environment variables Anchor to this heading

Environment variables can contain critical information such as tokens or additional configuration options for your app.

Environment variables can have different prefixes:

All other variables are part of $PLATFORM_VARIABLES.

To back up your environment variables:

  1. Get the variable’s values by running the following command:

    platform ssh -- 'echo $PLATFORM_VARIABLES | base64 -d | jq'

    Note that you can also get all the environment variable values by running the following command:

    platform ssh -- env
  2. Store the data somewhere secure on your computer.

  1. In the Console, open your project and click .
  2. Click Project Settings .
  3. Click Variables and access your variable’s values and settings.
  4. Store the data somewhere secure on your computer.

Note that in the Console, you can’t access the value of variables that have been marked as sensitive. Use the CLI to retrieve these values.

What’s next Anchor to this heading

Is this page helpful?