Copying data between organisations
Keep your organisations in sync without a copy function
Audience: System administrators, solution architects and integration partners.
API access requires an API client with the right role permissions.
Introduction
What to use for what Why there is no backup and restore
Manage the data model with Terraform Script what Terraform does not cover
Move product data Move assets Deployment order Versioning and rollback
Introduction
Bluestone PIM does not have a built-in function to copy, clone, or back up and restore a whole organisation from one environment to another. There is no "copy Prod to Test" button, and Bluestone Support cannot run one from the backend. Instead, you keep your environments in sync yourself, with tools you control.
This article is for system administrators, solution architects and integration partners who run more than one organisation, for example a Test or Staging organisation next to a Prod organisation, or two organisations in the same environment. It describes which method to use for each type of data, and in which order to deploy.
Please note: Users, roles, user groups and policies are not copied by any of these methods. They are managed separately in each organisation.
What to use for what
Once this is set up, refreshing Test or promoting changes to Prod is something you run yourselves, without involving Bluestone and without extra cost.
- Data model (attribute definitions, attribute groups, categories and category attributes, contexts, relation types, webhooks): use the Terraform provider for Bluestone PIM.
- Rules and other configuration not covered by Terraform: use the Bluestone PIM API, scripted and version-controlled.
- Product data: use the API or the native export and import, the same way the data was loaded into Prod.
- Assets (images and files): use the Media Bank API to bulk download, then upload to the target organisation.
Why there is no backup and restore
Bluestone PIM is a multi-tenant, event-driven platform built from many microservices. Your organisation is not stored in one database that can be snapshotted and restored. A restore that bypassed the APIs would leave downstream services, such as search, completeness and syncs, out of step with the data.
For this reason, every change has to go through the APIs. This also applies when you copy data between environments.
Manage the data model with Terraform
Use the Terraform provider for Bluestone PIM to manage your data model as code. The provider manages:
- Attribute definitions and attribute groups
- Categories and category attributes
- Contexts
- Relation types
- Webhooks
Do the following to keep both environments on the same definition:
- Import once. Import the existing Prod data model into Terraform state.
- Refresh Test. Apply the same definition to the Test organisation. Terraform shows a plan of exactly what will change before anything is applied.
- Promote changes. Make and test changes in Test, then apply the same definition to Prod.
Because both environments are built from one definition, configuration drift between Test and Prod disappears at the source.
For a walkthrough, see Managing your Bluestone PIM data model with Terraform.
Script what Terraform does not cover
Rules in the Rules engine and other configuration that the provider does not yet support are available through the same Bluestone PIM API. List each entity in the source organisation, and create or update it in the target organisation.
The quickest way to find the right endpoints is to connect your AI assistant or IDE to the Bluestone PIM docs MCP server.
Tip: Avoid making configuration changes manually in the UI. A change made by hand in one environment is a change that is missing in the other.
Move product data
Product data is outside the scope of Terraform. Use the API or the native export and import, the same way the data was originally loaded into Prod. If that first load was scripted, the same script pointed at Test is your refresh.
Tip: Consider whether Test really needs all of Prod every time. A representative subset of products is usually faster to load and safer to test against.
Move assets
To bulk download existing assets, use the Media Bank API. Do the following:
- Get the asset IDs. Use the endpoint that matches what you need:
- For the assets of specific products:
GET /products/{id}/assets - For all assets:
POST /assets/cursor/all - For filtered assets:
POST /assets/search/by-numbersorPOST /assets/cursor
- For the assets of specific products:
- Generate download URLs with
POST /assets/download. You can send up to 100 asset IDs per request. The response contains a presigned URL, the filename and an expiry time for each asset. - Download the files from the presigned URLs. The URLs are temporary, so download the files shortly after generating them.
- Upload the files to the target organisation.
In short: get asset IDs, batch them (maximum 100), generate download URLs, download.
Please note: API access requires an API client with the right role permissions. See Assign permissions to a role.
Deployment order
Load things in this order so that product data is never loaded against an incomplete or changing data model:
- Create or update the data model and configuration.
- Create or update the taxonomy and categories.
- Upload or update assets.
- Validate the configuration.
- Run the product feed.
- Validate the product data.
Versioning and rollback
- Keep your Terraform definitions and API scripts in version control, such as Git, with a version for each significant data-model change.
- Make each version describe the complete configuration for that point in time. You can then see what the data model looked like at any point, and deploy the same version to both Test and Prod.
- For product data, use the native export to keep a snapshot before larger changes.
Frequently asked questions
Can Bluestone Support copy Prod to Test for us?
There is no automated copy function. A one-off copy can be arranged with Bluestone as a paid service. Reach out to your Bluestone representative for an estimate. For anything you need to do more than once, we recommend the self-service approach described in this article.
Does a copy include users, roles and permissions?
No. Users, roles, user groups and policies are managed separately in each organisation by your System Administrator.
Can we copy in both directions?
Yes. The same Terraform definition and scripts can target either organisation. You choose the source and the target.
For more on the API and MCP tools, see Get started with Management API and Connect to the Bluestone PIM MCP Server.