Skip to main content

Import from Backstage

Port provides a simple script that can be used to import data from your Backstage instance into Port using the Backstage API.
The script initializes the blueprints and entities in Port based on the data in your Backstage instance.

The source code of the import script is open and available on GitHub.

Prerequisites
  • While it is not mandatory for this guide, we recommend that you complete the onboarding process before proceeding.
  • Docker.
  • A Backstage instance.

Run the script

  1. Clone the project repository repository:
git clone https://github.com/port-labs/backstage-import.git
  1. In the cloned repository, create a .env file with the following values:
BACKSTAGE_URL=<YOUR BACKSTAGE URL i.e https://demo.backstage.io>
PORT_CLIENT_ID=<YOUR PORT CLIENT ID>
PORT_CLIENT_SECRET=<YOUR PORT CLIENT SECRET>
  1. Run the import script:
./import.sh

Done! After the script completes, you will see new blueprints in Port, along with entities matching the data you have in your Backstage instance.

Next steps

Use Gitops to manage your resources

Once all of the data has been imported to Port, you will likely want to start managing it through specification files in Git.

  1. Go to your Port account.
  2. Click on the ... icon in the top right corner, then select "Export Data".
  3. Choose the blueprints you would like to export, select the GitOps format, and click Export.

This will download all the specification files to your local machine. You can then push them to your GitOps repository and begin managing them from there.

To learn more about managing your Port entities using GitOps, refer to the GitHub and Bitbucket GitOps pages.