Automating Archive Segment Backup and Offline Deletion in Process Historian 2014
In SIMATIC Process Historian 2014 (PCS 7 V8.1), automating the deletion of historical database segments from the local hard disk when storage runs low is achieved by configuring the Process Historian Management Console backup and offline policies. Process Historian does not delete active or closed archive segments directly from the local database without prior backup. By enabling 'Automatic Backup' to an external network share or dedicated backup drive, and activating the policy 'Set segments offline automatically after backup', completed segments are safely copied to the archive destination and their local SQL database files (.mdf and .ldf) are automatically detached and purged from the server drive, freeing up disk space.
Table of Contents
- Process Historian Segment Lifecycle Architecture
- Prerequisites for Automatic Segment Deletion
- Process Historian Archive States and Storage Action Matrix
- Step-by-Step Procedure to Automate Segment Backup and Offline Purging
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Process Historian Segment Lifecycle Architecture
SIMATIC Process Historian (PH) 2014 provides high-capacity, long-term central data archiving for PCS 7 OS servers and WinCC systems. Rather than storing process values and alarms in a single continuous table, Process Historian organizes data into time-bounded relational database partitions known as Archive Segments.
A segment transitions through five standardized lifecycle stages:
1. Active: The currently open database segment actively receiving real-time historical data from OS servers.
2. Closed: The segment's configured time duration (e.g., 1 day or 1 month) has elapsed or the maximum size limit has been reached; the segment is locked for writes and becomes read-only.
3. Backed Up: A complete SQL database backup file (.bak) of the closed segment has been verified and written to the external backup target directory.
4. Offline: The database files of the backed-up segment are detached from the active SQL Server instance and purged from the local physical storage drive.
5. Restored (On-Demand): An offline segment whose metadata is temporarily re-attached to the PH server from the backup share to service operator trend queries.
Prerequisites for Automatic Segment Deletion
To prevent catastrophic data loss, Process Historian strictly forbids deleting active or closed segments from local disks until a verified backup exists. When an engineer notices that local hard drives are filling up, technical analysis reveals that automatic segment removal is halted by one of three configuration oversights:
-
Unconfigured Automatic Backup Destination: If the backup path under Database -> Maintenance -> Backup is blank, segments remain in the 'Closed' state indefinitely. Process Historian will never purge an unbacked-up segment, eventually halting the server when disk capacity hits critical thresholds.
-
Missing 'Set Offline' Automation Policy: The administrator configured automated backups, but left the setting 'Set segments offline automatically after backup' disabled. Consequently, segments are backed up, but their original
.mdfand.ldffiles remain attached to SQL Server on the local disk. -
Backup Directory Storage Saturation: If the target network share or backup drive runs out of space, the backup task fails. Process Historian aborts the subsequent offline detachment step, causing local disks to saturate.
Process Historian Archive States and Storage Action Matrix
The following table details segment lifecycle states, physical storage locations, and automated transition rules:
Step-by-Step Procedure to Automate Segment Backup and Offline Purging
To configure automatic segment backup and local disk purging in Process Historian 2014:
-
Establish a Dedicated Network Backup Share:
- Create a shared folder on an enterprise NAS, storage area network (SAN), or secondary server (e.g.,\\NAS_PH_BACKUP\PH_Archives$).
- Ensure the Windows service account running the Process Historian services has full Read/Write/Modify permissions to this share. -
Configure Automatic Backup in PH Management Console:
- Launch the Process Historian Management Console on the PH server.
- In the navigation tree, expand Database -> Configuration -> Segments.
- In the right pane, select the Backup tab.
- Check the box Activate automatic backup.
- Under Backup Path, enter the UNC network share path (e.g.,\\NAS_PH_BACKUP\PH_Archives$). -
Enable Automatic Offline Policy:
- In the same configuration screen, check the box Set segments offline automatically after backup.
- Specify the retention delay if desired (e.g., keep segments local for30 daysbefore setting offline, or set to0 daysto delete immediately after verified backup).
- Click Apply to save the configuration. -
Configure Critical Disk Space Alarming:
- Navigate to Database -> Configuration -> Hard Disk Monitoring.
- Set the warning threshold to 15% free space and critical shutdown threshold to 5% free space.
- Save settings and restart the Process Historian management daemon if prompted.
Verification
Verify automatic segment archiving and disk cleanup:
1. In the Process Historian Management Console, navigate to Database -> Administration -> Segments.
2. Observe a newly closed segment; confirm that its state changes sequentially from Closed -> Backed Up -> Offline.
3. Browse to the external network backup share; verify that the .bak file for the segment is created with verified checksums.
4. In Windows Explorer on the PH server, browse to the local archive partition; verify that the .mdf and .ldf files for the offline segment have been removed, freeing local disk capacity.
Limitations and Operational Precautions
- Offline Query Latency: When an operator queries historical trends for a date range residing in an offline segment, WinCC displays a gap until the segment is brought back online via the PH Console.
- Network Share Reliability: If the network backup share becomes unreachable, backups halt and local disks will fill. Deploy redundant network links to the backup repository.
- Commercial Accuracy Notice: Sizing Process Historian server storage, SQL Server licensing, and backup capacity should follow the official Siemens PH-HWAdvisor tool recommendations.
Engineer FAQ
Can Process Historian automatically delete segments without backing them up?
No. Process Historian strictly enforces data integrity. Segments can only be set offline and purged locally after a verified backup has been completed.
What happens when a segment is set offline in Process Historian?
Its SQL database files (.mdf/.ldf) are detached from the active SQL Server instance and deleted from the local disk, while catalog metadata remains.
How can an operator view data from an offline segment?
In the Process Historian Management Console, an administrator locates the offline segment in the catalog and clicks 'Restore' or 'Set Online'.
What is the recommended segment size and duration in PH 2014?
Siemens recommends segment durations between 1 day and 1 month, with segment file sizes typically between 5 GB and 20 GB for optimal backup performance.
Technical References
- SIMATIC Process Historian Administration and Maintenance Manual (A5E39144865-AB)
- SIMATIC PCS 7 Compendium Part A - Configuration Guidelines (A5E39144865-AB)
- Siemens Industry Online Support: Backup Strategies for Process Historian (Entry ID: 109780813)
Related Articles
- Sizing SIMATIC Process Historian Hardware Using the PH-HWAdvisor Tool
- Managing SQL Server MSDBData.mdf Growth and Backup History in SIMATIC Process Historian
- Best Practices for Archiving SIMATIC PCS 7 Multiprojects Without Database Corruption
Related Tags
- Process Historian
- Archive Segments
- Automatic Backup
- Offline Segments
- Disk Space
- PH 2014