Automating Multiproject Backups and Version Archiving in SIMATIC PCS 7 via Version Trail
In SIMATIC PCS 7, attempting to automate multiproject backups using raw command-line PKZIP commands directly against active project folders is strongly discouraged because locked database files (SQL Server MDF/LDF files and Sybase/Access indices) will result in corrupted archives. The official, certified mechanism for automated and scheduled multiproject backups is the 'SIMATIC Version Trail' optional package. Version Trail integrates natively with SIMATIC Manager, automatically handling database detaching, generating unique version numbers, enforcing user comments, and supporting scheduled unattended archives via Windows Task Scheduler.
Table of Contents
- Why Raw PKZIP Scripting Fails on Active PCS 7 Projects
- SIMATIC Version Trail Architecture and Capabilities
- Comparison Table - PCS 7 Archiving Methodologies
- Step-by-Step Configuration of Automated Version Trail Backups
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Why Raw PKZIP Scripting Fails on Active PCS 7 Projects
Engineers frequently investigate methods to automate daily or weekly backups of SIMATIC PCS 7 Multiprojects. Because SIMATIC Manager utilizes an internal PKZIP executable (s7pkzip.exe) when users select File -> Archive, engineers often attempt to write Windows batch files or PowerShell scripts calling command-line PKZIP or 7-Zip directly against the project directory.
This approach creates critical database corruption hazards:
1. Locked Relational Databases: A PCS 7 Multiproject is not a static collection of files; it contains active databases (Microsoft SQL Server for WinCC projects, internal indices for STEP 7, and CFC chart pointers). External archive scripts execute while files are locked in exclusive write mode, resulting in incomplete copies.
2. Broken Cross-Project Pointers: Multiprojects span multiple sub-projects, Master Data Libraries, and OS servers linked via global unique identifiers (GUIDs). Raw compression utilities can miss open temporary pointers.
3. Restoration Failures: An archive created via raw command-line compression frequently fails when restored via SIMATIC Manager with errors such as Database cannot be attached or Project is inconsistent.
SIMATIC Version Trail Architecture and Capabilities
Documented in the SIMATIC PCS 7 Compendium Part A (Section 7.7), the certified Siemens solution for automated and controlled engineering archiving is SIMATIC Version Trail:
* Autonomous Version Engine: Version Trail is an add-on engineering package (e.g., 6ES7658-1EX18-2YB5) that operates within SIMATIC Manager.
* Safe Archiving Protocol: Before creating an archive, Version Trail safely flushes database transactions and releases file handles without stopping engineering workflows.
* Automatic Version Tracking: Each archive is tagged with a sequential version string (e.g., V1.0.0, V1.0.1), creation timestamp, user account, and mandatory change description.
* Command-Line & Task Scheduler Interface: Version Trail exposes an automated batch interface that can be triggered unattended via Windows Task Scheduler during off-shift hours.
Comparison Table - PCS 7 Archiving Methodologies
The following table compares different methods for archiving SIMATIC PCS 7 multiprojects.
6ES7658-1EX18-2YB5)Step-by-Step Configuration of Automated Version Trail Backups
To configure automated multiproject backups using SIMATIC Version Trail, execute the following steps:
-
Install and License SIMATIC Version Trail:
* Install SIMATIC Version Trail from the PCS 7 supplementary installation media.
* Transfer the license key (SIMATIC Version Trail) onto the Engineering Station via Automation License Manager (ALM). -
Configure Version Trail in SIMATIC Manager:
* Open SIMATIC Manager and load your Multiproject.
* Select the Multiproject root folder.
* In the menu bar, select Options -> Version Trail -> Configure.
* Specify the primary archive target directory (e.g., a dedicated NAS share or high-capacity secondary drive:D:\PCS7_Archives\).
* Configure version numbering rules and check Enforce comment upon archiving if manual milestones require change logs. -
Create Batch Automation Script:
* Version Trail provides the command-line utilityS7VerTrlCmd.exelocated in the STEP 7 binary path (C:\Program Files (x86)\SIEMENS\STEP7\S7BIN\).
* Create a batch scriptAutoArchive.bat:
cmd @echo off "C:\Program Files (x86)\SIEMENS\STEP7\S7BIN\S7VerTrlCmd.exe" /ARCHIVE "D:\Projects\MyPlant_MP\MyPlant_MP.s7p" /DEST "D:\PCS7_Archives" /COMMENT "Automated Scheduled Backup" -
Schedule Execution in Windows Task Scheduler:
* Open Windows Task Scheduler on the Engineering Station.
* Create a new task:PCS7_Daily_Multiproject_Backup.
* Set the trigger to daily at 02:00 AM.
* Set the action to runAutoArchive.batwith administrative privileges.
* Check Run whether user is logged on or not.
Verification
Confirm that automated archiving operates reliably and generates clean backups:
- Trigger Immediate Script Execution:
* Right-click the scheduled task in Windows Task Scheduler and select Run.
* Wait for task completion (Return code0x0). - Inspect Version Trail History:
* Open SIMATIC Manager. Select the Multiproject root.
* Select Options -> Version Trail -> Show History.
* Confirm that a new entry appears displaying the correct timestamp, version string, comment, and healthy status badge. - Perform Test Retrieval:
* Create a test directory.
* In SIMATIC Manager, select File -> Retrieve.
* Select the newly generated archive zip file.
* Confirm that the project retrieves completely without database attachment errors or missing file warnings.
Limitations and Operational Precautions
- Storage Capacity Management: Automated daily archiving generates large zip files (often 500 MB to 3 GB per archive). Implement an automated purge policy to archive older versions to secondary cold storage.
- Avoid Archiving During Full AS Downloads: Do not schedule automated archives during active plant turnaround hours when continuous controller downloading or OS compilation is taking place.
- Commercial Accuracy Disclaimer: Verify licensing requirements for SIMATIC Version Trail (
6ES7658-1EX18-2YB5) and optional Version Cross Manager (VXM) against current Siemens catalogs and authorized distributor quotations.
Engineer FAQ
Can Version Cross Manager (VXM) compare two Version Trail archives?
Yes. SIMATIC Version Cross Manager (VXM) integrates seamlessly with Version Trail, allowing engineers to compare any two historical archives and graphically highlight modified CFC blocks, parameters, and hardware changes.
Does Version Trail require closing SIMATIC Manager during backup?
No. Version Trail can archive the project while SIMATIC Manager is open, using safe internal synchronization locks.
Can Version Trail archive to a network mapped drive?
Yes, provided the Windows user account running the task has full read/write network share permissions on the target UNC path.
Is PKZIP included with PCS 7?
Yes. STEP 7 includes a licensed internal version of PKZIP (s7pkzip.exe), which Version Trail and SIMATIC Manager invoke automatically.
Technical References
- SIMATIC Process Control System PCS 7 Compendium Part A - Configuration Guidelines
- SIMATIC Version Trail for PCS 7 Operating Manual
- Siemens Industry Online Support Entry ID 107196780 (Version Management Overview)
Related Articles
- Proper Procedure to Clean Up Block Types in CFC and Why 'Compile Chart as Block Type' Fails with APL
- Migration Roadmap - Upgrading Legacy SIMATIC PCS 7 Projects from V6.0-V6.1 to V8.1
- How to Optimize and Reduce S7 F-Systems CFC Compilation Times in SIMATIC PCS 7
Related Tags
- Version-Trail
- Archiving
- Multiproject
- PKZIP
- Compendium
- Backup-Automation