Docs Menu

Export an Existing Realm Application

On this page

  • Procedure
  • Export from the Realm UI
  • Export with realm-cli
  • Output
  • Summary

Export is the v1 Realm CLI command, and is an alias for pull in the v2 Realm CLI.

As you develop a Realm app, you might want to share the codebase with team members, make a backup, or work with a version control system like Git. MongoDB Realm's export functionality makes this possible.

You can export Realm apps to a local application directory from the Realm UI or with the realm-cli pull command. If you'd like to export dependencies or hosting files, make sure to pass the relevant CLI flags as options when exporting the Realm app. For example, if you want to export dependencies, add the --include-dependencies flag to the pull command.

Exported application directories use the same name as the Realm app by default. Every configuration file must conform to its configuration file schema.

The simplest way to export a Realm app is directly from the Realm UI. To do so, click Deployment in the left-hand navigation, select the Export App tab, and then click the Export App button.

The button in the UI that exports your app

Realm apps can be exported programmatically via the Command Line Interface (realm-cli).


Ensure that you installed realm-cli and logged in with a valid API key.

You can export an application's configuration directory by specifying its remote App ID and an optional local path. If you do not specify a local path, the command outputs the configuration directory in the current working directory.

realm-cli pull --remote=<App ID> --local=<Output Directory Path> [options]

The directory specified by --output must not already exist, otherwise realm-cli throws an error and does not pull the configuration files.

Your application will be exported to a local application directory. If you did not specify a path for the directory with --output, it will be exported with the same name as the application into the current working directory.

Only entities that are configured in your application will appear in your exported application directory. See Realm Application Configuration for more information on configuration files.

├── realm_config.json
├── auth/
│ ├── providers.json
│ └── custom_user_data.json
├── data_sources/
│ └── <service name>/
│ ├── config.json
│ └── <database>/
│ └── <collection>/
│ ├── schema.json
│ └── rules.json
├── environments/
│ ├── no-environment.json
│ ├── development.json
│ ├── testing.json
│ ├── qa.json
│ └── production.json
├── functions/
│ ├── config.json
│ ├── <function>.js
│ └── <directory>/
│ └── <function>.js
├── graphql/
│ ├── config.json
│ └── custom_resolvers
│ └── <resolver name>.json
├── hosting/
│ ├── config.json
│ ├── metadata.json
│ └── files/
│ └── <files to host>
├── http_endpoints/
│ └── <service name>/
│ ├── config.json
│ └── incoming_webhooks/
│ ├── config.json
│ └── source.js
├── sync/
│ └── config.json
├── triggers/
│ └── <trigger name>.json
└── values/
└── <value name>.json
  • You can use Realm's export functionality to share your codebase, make a backup, or work with a version control system.
  • You can export Realm apps with the Realm UI or with the realm-cli pull command.
Give Feedback
© 2021 MongoDB, Inc.


  • Careers
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2021 MongoDB, Inc.