Migrating events using the Replicator App
If you're attempting this migration, feel free to ask questions and provide feedback via the PostHog Communty Slack workspace or a GitHub issue. You should also be aware that some of the steps on this document are potentially destructive! Proceed with caution.
Requirements
- Existing PostHog instance that you can login to (if self-hosting it should be running a minimum version of
1.30.0
) - New PostHog instance
Approach
With this migration, we will migrate over your events using a PostHog app, which will create the necessary person, person distinct ID, and related records in cloud.
We will only be migrating data used to run analytical queries, such as events, persons and person distinct IDs. This means that dashboard configuration, feature flags and other data that is not used in analytical queries will need to be recreated on cloud.
Instructions
Instructions for using PostHog Replicator app:
- Log in to your old PostHog instance
- Click 'Apps' on the left-hand tool bar
- Search for 'Replicator'
- Select the app, press 'Install'
- For the configuration details using the following:
Host
: the hostname of your new PostHog instance e.g.app.posthog.com
if you are using US cloud,eu.posthog.com
if you were are EU cloud, or the domain you'll be sending events to if you are self-hostingProject API Key
: the API key for the new project that you want to send events to - found in the project settings page.
- See events come into the new PostHog instance, identically to the originals
- Once the Replicator is activated, go back to the configuration menu and click the gear next to "Export historical events" under "Jobs." On the calendar, select a start and end date, then click "Run job now." This will begin the process of historical events being import (and might take a while). You can see the progress in logs or by clicking the "App metrics" button (graph) and going to the "Historical exports" tab.
- To track progress of the export you can click the graph icon next to the Replicator app and then click on the "Historical Exports" tab