Export a full copy of your app
Export a full copy of your app
You own the apps you build on Emergent. This guide shows you how to take a complete copy of a full-stack app (its code, its database, its environment variables and its uploaded files) so you always hold your own backup.
What makes up your app
A copy of your code alone is not a full backup. Each part of your app leaves Emergent a different way:
| Part | What it contains | How you get it | In the code export? |
|---|---|---|---|
| Code | Frontend and backend source, configuration, commit history | Save to GitHub | Yes |
| Database | All collections and documents your live app reads and writes | Download collections from the Database Manager, or ask support for a full export | No |
| Environment variables & secrets | API keys, passwords, service URLs, feature settings | Copy them yourself | No, by design |
| Uploaded files | Images, PDFs and documents your app stores in object storage | Contact support | No |
Before you start
You need:
- A paid plan (Standard or above) to use Save to GitHub. On the Free plan, you can still view and copy files from the Code button.
- A GitHub account. If the repository will belong to a GitHub organisation, you need permission to give the Emergent app access to it.
- An app that has been published at least once. Your production database and its connection details exist only after the first publish.
- Access to the app. The app owner and team members with access to the project can open the Database and Secrets tabs.
- A secure place for the copies. Your database downloads contain your users' data, and your secrets are passwords. Use encrypted storage and a password manager.
- Git on your computer (optional), to clone your repository.
Part A: Export your code to GitHub
Save to GitHub commits your project and pushes it, with its full history, to a repository you choose. Nothing is pushed automatically, so save each time you want a fresh copy.
Wait for the agent to finish
Open your project in Emergent and wait until the agent has finished its current task. Saving mid-task can capture half-finished changes.
Open Save to GitHub
Click the + button at the bottom-left of the message box, then choose Save to GitHub.
Connect GitHub (first time only)
Sign in and authorise Emergent. If your repository belongs to an organisation, give the Emergent app access to that organisation or repository.
Pick the repository and branch
Choose an existing repository or create a new one. We recommend a private repository. Then open the branch menu under the repository name and pick a branch, usually main. To save to a new branch instead, type its name in New branch name and click Create.
Save
Click Save.
Check on GitHub
Open the repository on GitHub and check that the latest commit and its time match your most recent work.
Take a local copy (optional)
Clone the repository:
git clone https://github.com/<your-account>/<your-repo>.gitOr download it from GitHub with Code → Download ZIP.
What the code export contains
| Included | Not included (by design) |
|---|---|
| All frontend and backend source code | .env files and key files (such as *.pem, *.key, credentials.json), see Part C |
| Configuration files and project structure | Database contents, see Part B |
| The project's commit history | Installed packages (node_modules), lock files, build output, logs and caches |
Your .gitignore rules | Files over 100 MB (GitHub's file size limit) |
To run your app somewhere else, install dependencies fresh (pip install -r backend/requirements.txt, and yarn install in frontend/), then add your environment variables (Part C) and your data (Part B).
Part B: Download your database
Your live app's data sits in a MongoDB database managed by Emergent. You can open it, browse it and download collections yourself with the Database Manager. For a complete export of the production database, contact support.
Info
You can't connect to your production database from your own computer with tools like mongodump or MongoDB Compass. Use the Database Manager instead. To export your preview (build-time) database, see Database (MongoDB).
Open the Database Manager
Open Manage
Open your project and click Manage at the top right of the chat.
Go to the Database tab
Click the Database tab, second to last in the Manage panel. You'll see your Website name and Mongo URL.
Open the database
Click View database ↗. The Database Manager opens in a new tab.
Sign in to your data
Enter your app name (copy it from Website name), or paste the Mongo URL, then click Access Database Securely. Access is linked to your Emergent account, so only people with access to your app can open its data.
Download collections
Choose Production
Choose Production at the top to see your live data. Preview shows the data used while building, and Split shows both side by side.
Open your database
Open your database in the left sidebar. It's usually named <your-app>-test_database. Despite the name, this is your production data: test_database is just the template's default name.
Select a collection
Select a collection, for example users or bookings.
Download it
Click Advanced options at the top right, then choose Download collection. The collection downloads to your computer.
Repeat and store safely
Repeat for each collection you need. Check that the files open, then move them to encrypted storage.
Leave Edit switched off
The Edit toggle changes your live data directly. You don't need it to view or download anything.
Full production database export
Downloading collections is the quickest way to keep copies of your data. If you need the whole production database in one export, for example to move your app to another host, email support from the account that owns the app. You can copy this template:
To: support@emergent.sh
Subject: Full production database export: <your app name>
Hi Emergent Support,
I'm the owner of the app below and I'd like a full export of its production database.
App name: <your-app> (as shown under Database → Website name)
App URL: <https://your-app-domain>
Account email: <the email you sign in to Emergent with>
What I need:
- A full export of the production database (all collections)
- A copy of the uploaded files in object storage: Yes / No / Not sure
Reason (optional): <for example, moving to my own hosting, or an offline backup>
Thanks,
<your name>Warning
Send it from the email address on the account that owns the app. Never include your Mongo URL, passwords or API keys: support will never ask for them.
Uploaded files
If your app lets users upload images, PDFs or other files, those files live in object storage (Emergent Object Store), and your database only holds references to them. Neither collection downloads nor a full database export include the files themselves.
To get a copy, contact support: answer Yes to uploaded files in the email above, or send a separate request with the same details.
Treat your data and the Mongo URL as sensitive
Your downloads contain your users' personal data, so store them encrypted. The Mongo URL is the password to your whole database: never share it in email, chat or support tickets. If you think it has been exposed, contact support so the database credentials can be changed.
Part C: Record your environment variables
Environment variables hold your API keys, passwords and service settings. To protect them, Emergent never includes them in code exports, and no Emergent agent or support engineer can read your production values. Only people with access to your app can copy them, so this step is manual.
Where to find them
| Environment | Where | Notes |
|---|---|---|
| Production (live app) | Manage (top right) → Secrets tab | The values your published app uses. Keys can have one shared value, or separate Test (preview) and Live (production) values. |
| Preview | Code view → backend/.env and frontend/.env | The values used while building. They may differ from production. |
Steps
List your keys
Open the Secrets tab of your deployment and list every key name.
Copy each value
Copy each value into a password manager, one entry per key, noting whether it's the Test or Live value. If a value isn't shown in full, get it from the provider's dashboard (for example Stripe or your email service) and generate a new key there if needed.
Check the preview values
Do the same for the preview .env files if your preview uses different values.
Keep them out of code
Never commit the values to GitHub or paste them into chat or tickets. If a key has ever been committed or shared, regenerate it with the provider.
For more on how secrets work, see Secrets & env variables.
Backups and a recommended routine
Emergent keeps previous published versions so you can roll back, and takes routine backups of production data to keep the platform resilient. These platform backups aren't a self-serve restore service, so keep your own copy too.
| What | When | How |
|---|---|---|
| Code | After every significant change, and before large agent tasks | Save to GitHub (Part A). Each save becomes a commit you can return to. |
| Database | Weekly, and before migrations, imports or big releases | Download your collections (Part B) and name the files by date. Ask support for a full export before a move. |
| Environment variables | Whenever you add or change a key | Update your password-manager entries (Part C). |
| Uploaded files | Before any move to another host | Request a copy from support (Uploaded files). |
Troubleshooting
Save to GitHub is available on Standard and above. Upgrade your plan, or copy your files from the Code view.
In GitHub, open Settings → Applications, give the Emergent app access to the repository or organisation (or revoke access and reconnect), then try again.
GitHub found a key in an earlier commit. Regenerate that key with its provider first, and keep the new value in the Secrets tab rather than in code. Then contact support to remove it from the project history.
A check in your repository (a pre-commit hook) may be rejecting commits, often because of very large files. Remove those files from git or relax the check, save again, and compare the latest commit on GitHub with your recent work.
Open the app, let the preview load, then save again.
Check whether they're listed in .gitignore, are over 100 MB, or are in the "not included" list in Part A.
Copy the app name again from Database → Website name (no spaces), make sure the app is published, and sign in with an account that has access to it.
Check that Production is selected, not Preview. If it's still missing, contact support with the collection name.
Final checklist
You hold a complete, independent copy of your app when:
- Code is on GitHub: the latest commit matches your most recent work.
- Code is on your computer: the cloned or downloaded folder opens and contains
backend/andfrontend/. - Database is backed up: you've downloaded every collection you need, or received a full export from support.
- Database files are stored securely: in encrypted storage, not in email or a shared folder.
- Environment variables are recorded: every key in the Secrets tab has a password-manager entry.
- Uploaded files are covered: your app doesn't store uploads, or you've requested a copy from support.
Getting help
Email support@emergent.sh from the account that owns the app, and include the app name. For your protection, we only act on requests from the app owner's account, and we will never ask you to send a connection string, password or API key.

