Before you begin
You need:1. Download your app’s code
Your app’s code is maintained through the Git version control system. To download your entire app’s code history:- Using the CLI
- Using Git
-
List all your projects by running the following command:
-
Retrieve the project you want to back up by running the following command:
2. Download your files
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.Network Storage mounts
If your project uses a Network Storage service (mounts withsource: service), the data lives in a dedicated service container rather than in the app container itself.
The download process is the same as for local mounts — use the CLI or rsync over SSH — but you need to target the path
as it is mounted inside the app container.
For example, to download a web/uploads network mount using the CLI:
Terminal
3. Download data from services
The mechanism for downloading from each service varies. For services designed to hold non-persistent data in memory only — such as ephemeral Redis, ephemeral Valkey, Memcached, 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 the instructions for each service below.Relational databases
Document & time-series databases
Search engines
Key-value stores (persistent)
Message brokers
Vector databases
4. Get environment variables
Environment variables can contain critical information such as tokens or additional configuration options for your app. Environment variables can have different prefixes:- Variables beginning with
env:are exposed as Unix environment variables. - Variables beginning with
php:are interpreted asphp.inidirectives.
$PLATFORM_VARIABLES.
To back up your environment variables:
- Using the CLI
- In the Console
-
Get the variable’s values by running the following command:
Note that you can also get all the environment variable values by running the following command:
- Store the data somewhere secure on your computer.
What’s next
- Migrate data from elsewhere into Upsun.
- Migrate to another region.
- To use data from an environment locally, export your data and set up your local development environment.