Configuring PI Data Archive to Overwrite Old Archives: A Storage-Saving Approach for Developers
Learn how to configure PI Data Archive to automatically overwrite old archives and manage limited disk space in development and test environments. Adjust critical tuning parameters like Archive_AutoArchiveFileRoot and Archive_OverwriteDataOnAutoShiftFailure to enable archive recycling and avoid manual intervention.
Roshan Soni
Configuring PI Data Archive to Overwrite Old Archives: A Practical Guide for Limited Storage Environments
In development and testing environments, it's common to face disk space constraints—especially when running a PI Data Archive server with limited drive capacity for archive files. For many, the default behavior of PI Data Archive is to create new archive files as older ones fill up, which can eventually fill the disk and halt operations until manual intervention occurs. Fortunately, the PI Data Archive includes tuning parameters that let you control archive behavior, including instructing the system to overwrite old archives when needed.
Understanding PI Archive Behavior
By default, the PI Data Archive will automatically create new archive files as the current (primary) archive reaches full capacity. This is done using the Archive_AutoArchiveFileRoot tuning parameter, which specifies the path and file name prefix for new archives. While this is ideal for production environments where data retention is essential, it can quickly fill up available storage on development or test systems.
How to Configure Overwriting of Old Archives
To switch from automatic archive file creation to a circular, overwrite behavior, follow these key steps:
1. Remove the Archive_AutoArchiveFileRoot Parameter
This parameter controls the automatic creation of new archive files. You can adjust this in PI System Management Tools (SMT):
- Navigate to Operation > Tuning Parameters in PI SMT.
- Locate the Archive_AutoArchiveFileRoot parameter and remove it.
Once removed, PI Data Archive will no longer create new archive files as the primary archive fills. Instead, when the primary archive reaches capacity, it will shift—the oldest archive will be re-purposed as the new primary and new data will overwrite its contents.
2. Set Archive_OverwriteDataOnAutoShiftFailure to 1
This parameter ensures that, if the server cannot create a new archive (for example, due to the disk being full), it will overwrite the data in the oldest archive:
- In PI SMT, locate the Archive_OverwriteDataOnAutoShiftFailure parameter.
- Set its value to 1.
This forces the archive subsystem to recycle the oldest archive file and overwrite its data, ensuring that data collection continues even when space is limited.
3. Monitor Archive Locations
The location of archive files is determined at creation, but the overwrite behavior is not path-dependent. If your archives reside on various drives, PI Data Archive will simply recycle the oldest file, regardless of its path. However, maintaining consistent directory structures can simplify administration.
Important Caveats
- Data Loss: This overwrite strategy means that older data will be permanently lost as it is replaced by newer information. Always ensure that you are comfortable with this data retention policy before implementing it outside of non-production environments.
- No Automatic Expansion: With
Archive_AutoArchiveFileRootremoved, no new archive files will be created. Ensure you have the desired number of archives available for rotation. - Monitor Archive Sizing: Properly size your archive files for the right data window, since this will determine your effective data retention period.
Summary Table
| Parameter | Action | Effect |
|---|---|---|
| Archive_AutoArchiveFileRoot | Remove | Stops automatic creation of new archives |
| Archive_OverwriteDataOnAutoShiftFailure | Set to 1 | Enables overwriting of oldest archive when full |
Conclusion
Enabling archive overwriting on PI Data Archive is a handy technique for dev/test environments with tight disk space constraints. By removing automatic new archive creation and enabling recycling via tuning parameters, you can keep your system running without manual intervention—even when storage is scarce. Always remember to monitor data retention needs and apply this strategy judiciously; it is not recommended for production systems where historical data preservation is critical.
If you have experiences or insights on PI Data Archive sizing and management, feel free to share them in the comments!
Tags
About Roshan Soni
Expert in PI System implementation, industrial automation, and data management. Passionate about helping organizations maximize the value of their process data through innovative solutions and best practices.
No comments yet
Be the first to share your thoughts on this article.
Related Articles
Enhancing PI ProcessBook Trends with Banding and Zones: User Needs, Workarounds, and the Road Ahead
A look at the user demand for trend banding/zoning in OSIsoft PI ProcessBook, current VBA workarounds, UI challenges, and how future PI Vision releases aim to address these visualization needs.
Roshan Soni
Migrating PIAdvCalcFilVal Uptime Calculations from PI DataLink to PI OLEDB
Learn how to translate PI DataLink's PIAdvCalcFilVal advanced calculations—like counting uptime based on conditions—into efficient PI OLEDB SQL queries. Explore three practical approaches using PIAVG, PIINTERP, and PICOunt tables, and get tips for validation and accuracy.
Roshan Soni
Understanding PI Web API WebID Encoding: Can You Generate WebIDs Client-Side?
Curious about how PI Web API generates WebIDs and whether you can encode them client-side using GUIDs or paths? This article explores the encoding mechanisms, current documentation, and best practices for handling WebIDs in your applications.
Roshan Soni