How-to
Move PI historian data to another PI server without MQTT
Short answer
The PI Connector for MQTT only subscribes to a broker and writes into PI; it cannot publish, and a PI server has no broker role. Move tag data between two PI historians with the PI to PI interface. Use MQTT only when policy mandates a broker, and then add your own publisher on the source.
On this page
The PI Connector for MQTT cannot move data from one PI historian to another. It is a subscriber by design: it collects values when a publisher sends them to the topics it follows, and it writes what it receives into PI. It has no publish function, and a PI Data Archive has no broker role, so nothing on the source side can accept an MQTT connection. Between two PI servers, the supported path is the PI to PI interface, which transfers and archives time-series data from one PI Data Archive to another with no broker involved. Reserve MQTT for the one case that requires it — a policy that mandates a broker between sites — and then add your own publisher on the source plus the connector on the destination. The steps, the buffering arithmetic and the verification tests follow.
Why the MQTT connector cannot be the sender #
The connector's documented input is a broker connection, a set of subscribed topics and a mapping from payload to PI tags: it collects data when new data is published to the topics it subscribes to. Two consequences follow from that design.
Support for MQTT 3.1 and 5.0 describes the subscribe-side broker session. It is not a publish capability, so "it supports MQTT 5" does not mean the connector can send PI data out to a broker of either version.
The write target is a PI server. A PI Data Archive holds no MQTT listener, so pointing the connector at a second PI server does nothing: there is no broker to subscribe to and no function that publishes. If the requirement is literally "PI to PI over MQTT", it has no supported implementation as written and needs to be redirected — the table below gives the redirect for each underlying goal.
Match the path to the requirement #
Ask the requirement owner what the MQTT clause is for. Three answers cover nearly every request, and each has a different path:
| What the requirement says | Path | Who publishes |
|---|---|---|
| Get the tag values into a second PI server | PI to PI interface | Nobody — server to server, no broker |
| Same values, plus AF elements or references on the destination | PI to PI interface plus the PI System Connector for AF | Nobody |
| A broker must sit between the two sites | Your publisher on the source, an external broker, the PI Connector for MQTT on the destination | Software you own and maintain |
The first row is the common case and the rest of this article walks it; the third row is covered after the verification tests.
Move the tag data with PI to PI #
The interface's documented purpose matches the request directly: it transfers and archives time-series data from one PI Data Archive to another, to consolidate or replicate it. Configure it in this order:
- Rebuild the point definitions first. PI Builder exports the PI tags with all their attributes; use that export to recreate identical tags on the destination before any values flow. Match point type, engineering units and the exception and compression settings on each pair so the destination archive stores what the source stores, without conversion or truncation.
- Place the interface on the receiving side. The vendor's collective walkthrough installs the interface on the secondary server, so plan for the destination to pull from the source. Keep the network path minimal: open the PI Data Archive port between the two servers only, and take the port number for your installed version from the interface documentation. If the interface gets a dedicated node rather than a place on an existing server, a fanless mini PC in the cabinet is the usual host for a service that has to run continuously.
- Grant read access and nothing more. Create the credential mapping the interface account needs on the source, then grant read on the tags in scope. A read-only scope is also the safety line here: the interface node cannot write to or reconfigure the source historian.
- Create and configure the instance. Instances are created in the PI Interface Configuration Utility, reached from Start > All Programs > PI System > PI Interface Configuration Utility. Point the instance at the source server and the tag list; the interface's own settings live in its PItoPI portion of the utility, alongside the General portion.
- Turn buffering on at the interface node. Buffering queues events locally during a link outage and replays them with their original timestamps on recovery — the same no-loss discipline as an MQTT to Kafka edge pipeline built to keep every message. Without it, the outage becomes a permanent gap in the destination archive.
- Enable tag-attribute override parameters when a collective is involved. If either server is a Data Archive collective member, the vendor documents the tag-attribute override parameters as a requirement for PI to PI transfers between members; set them before the first start.
- Add AF coverage separately when it is needed. PI to PI moves tag data only. If consumers on the destination need elements or references, run the PI System Connector for AF alongside the interface instead of rebuilding the hierarchy by hand.
- Run through one interruption before sign-off. Start the instance, let it reach steady state, break the link on purpose, restore it and confirm replay before calling the transfer done.
Size the buffering with real numbers #
The rates below are an illustrative planning example, not a vendor limit — your own scan classes and compression set the real rate, and you should pull it from the source archive before sizing anything.
Assume the interface transfers 2,000 tags and source exception and compression leave each tag averaging one archived event every 10 s. The interface then carries 2,000 tags ÷ 10 s = 200 events/s. A 30-minute link outage therefore queues 200 events/s × 1,800 s = 360,000 events on the interface node, all replayed after recovery with their original timestamps. The same rate sizes the verification window: one hour of steady state should hold 200 events/s × 3,600 s = 720,000 events in a recorded-values query on each archive, within compression differences.
The figures move linearly with the event rate: at one event every 5 s per tag, the queue and the hourly count both double; heavier compression lowers them by the same factor. If the destination's hour comes up short by the size of a few tags, check those tags' read permissions on the source first, then their point-type match.
Verify the transfer #
Four checks, run against both servers:
- Latest value. Compare current value and timestamp for five sample tags on both servers; they match within the interface's transfer latency.
- Definitions. Point type and engineering units on each destination tag equal the source tag, with no truncation.
- Continuity. The recorded-values count over a shared one-hour window matches the expected figure from the sizing example on both archives.
- Recovery. After the planned interruption in step 8, buffered events arrive with original timestamps and no gap between the last pre-outage event and the first replayed one.
A destination tag showing bad or stale status while the source is healthy points to the interface account's read permission on that tag first, then to the point-type match.
When policy forces a broker #
If a policy genuinely mandates a broker between the two servers, the path has three stages, and only the third is a connector function:
- Publish from the source. Read the source server with your own client or data-access service and publish the values to the broker. This stage is custom or third-party software; the connector cannot do it. The pattern is the same as bridging OPC UA PLC data to MQTT with an edge PC, with the PI archive in place of the PLC.
- Run the broker. A broker only relays messages between a publisher and the subscribers currently connected to it. The session model is covered in the guide to how MQTT clients publish and subscribe through the broker. You own topic naming, payload schema and its versioning, QoS, retained-message behavior and TLS. Where the broker physically runs is its own decision; the trade-offs are set out in Running an MQTT broker in the PLC or on a separate device.
- Subscribe on the destination. The PI Connector for MQTT subscribes to your topics and writes what it receives into the destination PI server — the function it is built for, against an MQTT 3.1 or 5.0 broker.
Budget the differences before committing to this path: a publisher application to maintain, a payload schema to version, timestamp and quality mapping into PI, and your own back-fill after a link outage, because QoS covers delivery over a live session, not hours of dead link. Record in the design document that the publisher stage sits outside the connector. Choose this path only when the broker is mandated; otherwise PI to PI is simpler at every step.
The decision for each case #
- Move tag values: PI to PI interface, definitions rebuilt with PI Builder, buffering on, verified by the four checks. Done — no broker, no publisher, no payload schema.
- Values plus AF context: PI to PI for the archive data and the PI System Connector for AF for elements and references.
- Broker mandated by policy: your publisher, an external broker, the connector on the destination, and a written plan for schema versions and outage back-fill.
- Never feasible as written: PI-to-PI over MQTT using the connector as the sender. There is no publish function, and a PI Data Archive accepts no MQTT connections.
Questions asked
Can the PI Connector for MQTT publish PI data to a third-party broker?
No. The connector subscribes to an MQTT 3.1 or 5.0 broker and writes what it receives into PI servers; publishing PI data outward is not a function it has. The Sparkplug variant behaves the same way, collecting what publishers send to the topics it follows. If a broker must sit between two PI servers, a separate publisher application on the source feeds the broker, and the connector subscribes on the destination.
Does the PI to PI interface move AF structures between servers?
No. PI to PI transfers and archives time-series tag data only. AF elements, attributes and references need the PI System Connector for AF, run alongside the interface when destination consumers need that context. Recreating the hierarchy by hand on the destination tends to drift out of sync with the source, which is why the connector is worth running from the start.
What happens to data when the link drops during a PI to PI transfer?
With buffering enabled on the interface node, events queue locally and replay with their original timestamps when the link returns, so the destination archive keeps continuity. Without buffering, the outage leaves a permanent gap. The queue also occupies disk on the interface node, so size that store for the longest outage you intend to ride out, using your tags' actual event rate.
Can a PI server stand in as the broker for the connector?
No. A PI Data Archive has no MQTT broker role, so a publisher on the source side has no listener to connect to and a connector there has nothing to subscribe to. The broker in the three-stage path must be a separate MQTT 3.1 or 5.0 broker, wherever it physically runs.