Promote a secondary server to primary
- Last UpdatedApr 28, 2023
- 2 minute read
Use the piartool utility to promote a secondary Data Archive server to a primary server. You might need to do this if the primary server becomes unavailable or you want to decommission the existing primary server and replace it with a new server.
Note: This procedure assumes that you have an independent PI AF server or a primary PI AF server that you are not moving or promoting. If that is not the case, additional steps might be necessary.
-
Perform all necessary preliminary steps.
-
Review the buffering configuration for interfaces and servers and the host server specification at each interface.
The configuration and specification must refer to the server that you want to promote. For more information see Buffering configuration when you add a server to a collective and additional steps for using interface failover.
-
If applicable, shut down the existing source primary server.
-
Verify that no updates are pending for a secondary server.
In Collective Manager, check that LastSyncRecordID contains the same value at the primary server and all secondary servers.
-
Shut down the primary server.
-
If the primary or independent PI AF server is installed on the same machine as this primary Data Archive server, then start PI AF server.
-
-
Update the collective definition on the secondary server that you want to promote.
-
Open a command window on the secondary server that you want to promote.
-
Navigate to the ..\PI\adm directory.
-
To drop the primary server from the collective, type:
piartool -sys -drop OldPrimaryServerName
-
To promote the secondary server to primary server, type:
piartool -sys -promote SecondaryServerName
-
-
Synchronize the new primary PI Data Archive server with PI AF server. If you do not need to synchronize with the PI AF Server, you must still restart the PI Base Subsystem service on the new primary server.
-
Reinitialize using Collective Manager.
-
Generate a new machine signature file and a new license activation file on the computer that will host the new primary Data Archive server.
-
Copy the new license activation file to all members of the Data Archive collective.