Updating a collector manually
This page describes how to manually update a collector. For a more automated approach, see Updating a collector automatically.
Important upgrade notes
Manually updating a collector follows the same steps as Installing a collector.
Generating a new API token will invalidate the current token after 24 hours. During this period, the collector will continue to send data. If you still have the existing token available, you do not need to generate a new token to upgrade the collector.
When upgrading from a collector version that does not support advanced settings in the historian, you must first recover the environment variables before upgrading. During the upgrade process, the environment is overwritten.
Before upgrading, always review the release notes of all collector versions between your current version and the target version for any breaking changes.
Recovering environment variables before upgrade
Linux
Environment variables are stored in the environment file:
Replace the x values with the collector ID (available in the historian).
Windows
- Open Registry Editor.
- Navigate to Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
- Select factry-collector-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
- Right-click Environment and select Modify…
- Note all environment variables except:
- API_TOKEN
- SERVICE_NAME
- WORKING_DIRECTORY
Configuration
After installation, the collector automatically registers itself with the historian. The collector configuration will then be available in the historian UI.
Switching to a new collector service
To switch a collector instance in the historian to a new collector service:
- Generate a new API token
- Install a new collector service using this token
- Remove the old (inactive) collector service from the system
Using a new server
You can move a collector to a different server. Ensure that all required TCP ports from the Historian server are reachable from the new collector host.
Expected outcome
After a successful upgrade:
- The collector runs the new version
- The collector reconnects to Factry Historian
- The collector appears online and resumes sending data
- Existing measurements and configuration remain available
Troubleshooting
Collector does not come online after upgrade
Possible causes:
- Incorrect API URL configured in the historian
- Network connectivity issues between the collector host and the historian
Verify the API URL under Configuration > General > API > URL, confirm network access, and check that required settings were restored before upgrading.