Import From Backstage
Port provides a simple script that can be used to import data from your Backstage instance using the Backstage API into Port in a single click. 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
- Port organization;
- Backstage instance.
- Clone the project repository repository:
git clone https://github.com/port-labs/backstage-import.git
- In the cloned repository, create a
.envfile 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>
- Run the import script:
Done! after the script completes, you will see the new blueprints in Port, along with entities matching the data you have in your Backstage instance.
Export to GitOps
Once all entities have been imported to Port, you will likely want to start managing them through specification files in Git.
To do this, click on the three-dot icon in the top right corner of the Port UI, then select "Export Data" from the menu, followed by "Export to GitOps." 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.