Upsun User Documentation

Exporting data

Try Upsun for 15 days
After that, enjoy the same, game-changing Upsun features for less with the First Project Incentive!¹ A monthly $19 perk!
Activate your 15-day trial
¹Terms and conditions apply

As a Upsun 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:

  • Git
  • A Upsun account
  • Code in your project
  • Optional: the Upsun CLI

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:

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

    upsun get PROJECT_ID

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:

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

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

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

What’s next Anchor to this heading