Upsun User Documentation

Migrate the data of your Laravel app

Upsun Beta access

Test and provide feedback for our newest offering - Upsun!

You can register for the Beta by clicking here and completing the form.

Sign up for Beta access

Migrate your data Anchor to this heading

If you are moving an existing site to Upsun, then in addition to code you also need to migrate your data. That means your database and your files.

Import the database Anchor to this heading

First, obtain a database dump from your current site, such as using the

Next, import the database into your Upsun site by running the following command:

upsun sql < dump.sql

That connects to the database service through an SSH tunnel and imports the SQL.

Import files Anchor to this heading

First, download your files from your current hosting environment. The easiest way is likely with rsync, but consult your host’s documentation.

This guide assumes that you have already downloaded all of your user files to your local files/user directory and your public files to files/public , but adjust accordingly for their actual locations.

Next, upload your files to your mounts using the upsun mount:upload command. Run the following command from your local Git repository root, modifying the --source path if needed.

upsun mount:upload --mount src/main/resources/files/user --source ./files/user
upsun mount:upload --mount src/main/resources/files/public --source ./files/public

This uses an SSH tunnel and rsync to upload your files as efficiently as possible. Note that rsync is picky about its trailing slashes, so be sure to include those.

You’ve now added your files and database to your Upsun environment. When you make a new branch environment off of it, all of your data is fully cloned to that new environment so you can test with your complete dataset without impacting production.

Is this page helpful?