Event Replicator

Last updated:

What does the Replicator app do?

The Replicator app copies events from one PostHog instance to another, at the moment they are ingested. No changes are made to the events by this app if it runs in isolation.

If this app is deployed in a chain then any changes made to the event data before the Replicator runs will also be copied to the new instance. Otherwise, no changes will be copied.

What are the requirements for this app?

The Replicator app requires two instances of PostHog running either PostHog Cloud, or a self-hosted PostHog instance running version 1.30.0 or later.

Not running 1.30.0? Find out how to update your self-hosted PostHog deployment!

Both versions of PostHog should ideally be running the same version.

How do I use the Replicator app?

To migrate your events, we'll be using the PostHog Replicator app:

  1. Disable the GeoIP plugin of your new PostHog instance
  2. Log in to your old PostHog instance
  3. Click 'Apps' on the left-hand tool bar
  4. Search for 'Replicator'
  5. If self-hosted, select the app, press 'Install' (or make sure it's the latest version)
  6. 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-hosting
    • Project API Key: the API key for the new project that you want to send events to - found in the project settings page.
  7. After clicking save and activating it (toggle on the left side), the Replicator will start to run. Any events added to your old instance will be replicated in your new instance. It can take a little while (15-20 minutes) for the first events to show up.
  8. 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.
  9. 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
  10. Re-enable the GeoIP plugin of your new PostHog instance
  1. Log in to your PostHog instance
  2. Click 'Apps' on the left-hand tool bar
  3. Search for 'Replicator'
  4. Select the app, press 'Install' and follow the on-screen instructions
  5. See events come into another PostHog instance, identically to the originals

Configuration

OptionDescription
Host
Type: string
Required: True
E.g. posthog.yourcompany.com
Project API Key
Type: string
Required: True
Grab it from e.g. https://posthog.yourcompany.com/project/settings
Replication
Type: string
Required: False
How many times should each event be sent
Events to ignore
Type: string
Required: False
Comma-separated list of events to ignore, e.g. $pageleave, purchase

Is the source code for this app available?

PostHog is open-source and so are all apps on the platform. The source code for the Replicator is available on GitHub.

Who created this app?

We'd like to thank PostHog team members Yakko Majuri and Michael Matloka for creating the Replicator app.

Who maintains this app?

This app is maintained by PostHog. If you have issues with the app not functioning as intended, please raise a bug report to let us know!

What if I have feedback on this app?

We love feature requests and feedback! Please create an issue to tell us what you think.

What if my question isn't answered above?

We love answering questions. Ask us anything via our Support page.

You can also join the PostHog Community Slack group to collaborate with others and get advice on developing your own PostHog apps.

Questions?

Was this page useful?

Next article

GitHub Release Tracker

What does the GitHub Release Tracker do? This app enables you to tracker releases in GitHub as events in PostHog. This is useful for correlating releases with user behaviour or performance issues, for example. What are the requirements for this app? The GitHub Release Tracker requires either PostHog Cloud, or a self-hosted PostHog instance running version 1.30.0 or later. Not running 1.30.0? Find out how to update your self-hosted PostHog deployment ! If you want to track releases from a…

Read next article