Backup Running WinCC Projects with VSS Shadow Copy
Backing up a live WinCC V7.x project while Runtime is active is a recurring engineering problem. The official WinCC Copy Project tool requires an additional license and cannot be used on every installation. This guide consolidates two VSS-based (Volume Shadow Copy Service) methods that copy locked project databases, archives, and configuration files without interrupting the running HMI/SCADA service, plus a method for scheduling the backup through Windows Task Scheduler.
1. Why Standard File Copy Fails on Live WinCC Projects
A WinCC V7 project is a collection of files under a project directory (default C:\WinCC_Projects\<ProjectName>\) plus an SQL Server database (WinCC V7 uses Microsoft SQL Server 2008 R2 / 2014 depending on version). During Runtime the following handles are open and block the standard Win32 read-share that xcopy or robocopy use:
-
CCArchiveConnMon.exe— Connectivity Pack archive connector (when the option is installed). -
CCAlgRt.exe,CCAsmRt.exe— alarm and asset Runtime servers. -
CCProcRt.exe— process value Runtime. -
SQLSERVER.EXE— holds.mdf/.ldfof the project database with an exclusive write lock.
The Windows Volume Shadow Copy Service (VSS) solves this by snapshotting the volume at the NTFS level. VSS-aware tools (VSS requesters) freeze I/O for a few hundred milliseconds, take a consistent snapshot, then release. The user-mode backup then reads from the snapshot, never from the live file handles.
2. Methods Compared
| Method | License | VSS | Scheduled | Captures open DBs | Notes |
|---|---|---|---|---|---|
| Siemens "WinCC Copy Project" tool | Paid add-on | Internal | Yes (WinCC CCArchSrv) | Yes | Official, documented in SIOS 38493803 |
| HoboCopy CLI | Free (BSD-style) | Yes (vssapi) | Yes (Task Scheduler / cmd) | Yes (incl. SQL MDF/LDF) | Lightweight, single EXE, no installer |
| FreeFileSync + RealTimeSync | Free / Open Source | Yes (Windows native) | Yes (RealTimeSync) | Yes (except CCArchiveConnMon) | GUI + CLI; known issue with Connectivity Pack |
| Robocopy / Xcopy | Windows built-in | No | Yes | No — skips locked files | Requires WinCC Runtime stop |
3. Prerequisites
- Administrator account on the WinCC server (VSS requesters must run elevated).
- WinCC V7.0 SP2 or later project on a local NTFS volume.
- Target path with NTFS write permission for the service account running the backup (local folder, UNC share, or USB drive formatted NTFS).
- If using HoboCopy: Microsoft Visual C++ 2010 x86 Redistributable on the operator station if
HoboCopy.exefails to start (MSVCR100.dllmissing). - If scheduling: Windows Task Scheduler service running, account with Log on as batch job right.
4. Method A — HoboCopy (Command-Line)
HoboCopy is a small (under 200 KB) VSS requester originally written by CodePlex contributors and now mirrored on GitHub. It exposes a single HoboCopy.exe with three verbs: backup, replicate, and clone. The replicate verb creates an incremental mirror and is the right choice for project backups.
4.1 Install the Binary
- Create
C:\Tools\Hobocopy\. - Extract
HoboCopy.exeandHoboCopy.pdbto that directory. - (Optional) Install Microsoft Visual C++ 2010 x86 Redistributable if the EXE errors on launch.
- Verify with:
C:\Tools\Hobocopy>HoboCopy.exe— expected output is the syntax help.
4.2 First Full Backup
Open cmd.exe as Administrator and run:
hobocopy.exe C:\WinCC_Projects\MyPlant \\NAS01\Backup_WinCC\MyPlant
Switches used:
| Switch | Purpose |
|---|---|
/recursive |
Include subdirectories and empty directories. |
/full |
Force full copy even if an XML journal exists (used for first run). |
/incremental |
Use the journal in the target to copy only changes. |
/skipdenied |
Continue past files that return ACCESS_DENIED. |
/r:<N> |
Retry count on VSS transient errors (default 3, recommend 5). |
/w:<N> |
Wait seconds between retries (default 5). |
/quiet |
Suppress per-file progress, write summary only. |
/y |
Suppress overwrite prompts. |
4.3 Incremental Mirror for Daily Backup
After the first successful run, HoboCopy writes a hobocopy.xml journal inside the target root. Subsequent runs become incremental and only touch changed files:
hobocopy.exe /incremental /r:5 /w:10 /quiet C:\WinCC_Projects\MyPlant \\NAS01\Backup_WinCC\MyPlant
Typical runtime for a 6 GB WinCC project with 50 MB of daily archive deltas: under 90 seconds on local SSD; under 5 minutes on a 1 GbE share.
4.4 Batch File Skeleton
@echo off
set SRC=C:\WinCC_Projects\MyPlant
set DST=\\NAS01\Backup_WinCC\MyPlant
set LOG=C:\Logs\Hobocopy_%date:~-4%%date:~3,2%%date:~0,2%.log
echo --- %date% %time% --- >> %LOG%
"C:\Tools\Hobocopy\HoboCopy.exe" /incremental /r:5 /w:10 %SRC% %DST% >> %LOG% 2>&1
if %ERRORLEVEL% NEQ 0 (
echo Backup FAILED code %ERRORLEVEL% >> %LOG%
exit /b %ERRORLEVEL%
)
echo Backup OK >> %LOG%
5. Method B — FreeFileSync (GUI + RealTimeSync)
FreeFileSync wraps the same VSS API as robocopy /Z but exposes a two-pane folder comparison. RealTimeSync is the bundled scheduler.
5.1 Create a Backup Job
- Install or extract FreeFileSyncPortable.
- Left pane: browse to
C:\WinCC_Projects\MyPlant. - Right pane: browse to the destination share.
- Click Compare — FreeFileSync requests a VSS snapshot, which is why it can read
CCArchiveConnMon.exe-locked files in most cases. - Synchronize → Mirror.
-
File → Save as Batch Job →
Backup_FFS.ffs_batch.
5.2 Known Limitation with Connectivity Pack
If the WinCC server has the Connectivity Pack option installed, the CCArchiveConnMon.exe process holds an exclusive lock on the archive database. FreeFileSync will report file locked by process and skip those files. Two workarounds:
- Use HoboCopy instead (it interacts with VSS at a lower layer and can usually copy these handles).
- Stop only the
CCArchiveConnMonWindows service for the duration of the backup:net stop "CCArchiveConnMon", run FFS,net start "CCArchiveConnMon".
5.3 RealTimeSync Schedule
RealTimeSync monitors a folder and triggers the .ffs_batch when the source changes. For a fixed 24-hour schedule, prefer Windows Task Scheduler instead:
"C:\Program Files\FreeFileSync\RealTimeSync.exe" "C:\Jobs\Backup_FFS.ffs_batch"
6. Scheduling the Backup with Windows Task Scheduler
- Open
taskschd.msc. -
Create Task (not Basic Task) — name:
WinCC_Backup_HoboCopy. - Tab General: select Run whether user is logged on or not and Run with highest privileges.
- Tab Triggers: New → Daily, 02:00, enabled.
- Tab Actions: New → Action = Start a program, Program =
C:\Tools\Hobocopy\Backup.cmd(or the FFS batch + RealTimeSync command). - Tab Conditions: uncheck Start only if on AC power on servers; check Start only if the following network connection is available if the target is a UNC share.
- Tab Settings: If the task fails, restart every 1 minute, up to 3 times; If the running task does not end, force it to stop after 1 hour.
- Click OK, supply the service account credentials, and tick Do not store password only if the account has a non-expiring password.
7. Verifying the Backup
-
File count parity:
robocopy \NAS01\Backup_WinCC\MyPlant C:\Verify /L /E /NJH /NJS /NDL /NP /LOG:verify.log— compare the file count from the backup log to a baseline of the source. -
Project opens in WinCC Explorer: copy the snapshot to a test station, open WinCC Explorer, activate the project with Runtime stopped. A corrupted
*.mdfwill throw Database cannot be opened immediately. -
Archive round-trip: open the Tag Logging editor, switch the archive source to the backup copy, query a known historical tag. Empty values indicate a corrupt
.ldf. -
Checksum: use
certutil -hashfile <MDF> SHA256on both source and snapshot; the hashes must match for files copied while Runtime was idle.
8. Troubleshooting Matrix
| Symptom | Root cause | Fix |
|---|---|---|
HoboCopy.exe errors with "MSVCR100.dll not found" |
Missing VC++ 2010 runtime | Install Microsoft Visual C++ 2010 x86 Redistributable |
| VSS error 0x8004231F (provider not registered) | VSS service disabled or Volume Shadow Copy service account broken | Set Volume Shadow Copy service to Automatic, restart, re-register vssvc.dll
|
FreeFileSync skips files held by CCArchiveConnMon.exe
|
Connectivity Pack holds exclusive lock | Use HoboCopy, or stop/start CCArchiveConnMon around the backup window |
| Backup is empty / no files copied | Journal from a different source is in the target | Delete hobocopy.xml in the target or run with /full
|
| Task Scheduler reports 0x800710E0 | Operator failed to enumerate VSS writers | Grant the task account Backup Operators local group membership |
| Robocopy returns 0 but files are zero-length | Robocopy read the VSS snapshot of an unmounted volume | Switch to a VSS-aware tool (HoboCopy / FFS); never use plain robocopy for live WinCC |
| Backup target fills disk | Mirror never prunes deleted files | Add a retention step: move backups older than N days to a \NAS\Archive\YYYY-MM-DD folder |
9. Retention and Off-Site Copy
Project backups are only as good as their retention. A pragmatic policy for a single-server WinCC plant:
- Hourly incrementals kept for 24 h on a local second disk (fast recovery).
-
Daily full mirror (HoboCopy
/full) kept for 7 days on a NAS share. -
Weekly full copied off-site (rsync, Robocopy
/MIRto a second site, or cloud sync) and kept for 12 months.
Add a scheduled forfiles command to prune:
forfiles /p "\\NAS01\Backup_WinCC\Daily" /m *.zip /d -7 /c "cmd /c del @path"
10. Field-Proven Caveats
- VSS writers on Windows Server 2003 / XP are limited. SQL Server 2005 ships a VSS writer that captures the database in a crash-consistent state. WinCC V7.0.2 was certified on this stack. On Windows Server 2016+ with SQL 2014, the SQL writer is fully application-aware and produces a transactionally consistent backup.
- Avoid running HoboCopy during a WinCC project recompile. The Graphics Designer rewrites picture caches and can hold brief exclusive locks even at the VSS layer. Schedule backups outside the engineering window.
-
Antivirus real-time scan of
C:\WinCC_Projectswill block VSS snapshot creation. Add the project directory to the AV exclusion list on the WinCC server. -
Project paths with spaces must be wrapped in quotes in the HoboCopy command line; UNC targets with embedded spaces are supported but require the
/yswitch to suppress the overwrite prompt. - Clustered WinCC / WinCC Redundancy: always back up the preferred server only. The standby server mirrors runtime data via the redundancy DLL, not via the file system, so its project directory is not authoritative.
11. When to Use the Licensed Siemens Tool
Use the official WinCC Copy Project tool (described in SIOS 38493803) when:
- Customer site policy mandates only Siemens-signed executables on the SCADA server.
- You need an MD5/SHA verification report generated by WinCC itself.
- You want the backup to be triggerable from inside the WinCC archive configuration (CCArchiveSrv schedule) rather than Windows Task Scheduler.
Use HoboCopy / FreeFileSync when the licensed tool is not available, when you need a portable install on a service laptop, or when the project is large and a one-shot batch from a UNC share is more practical than the WinCC dialog flow.
Does HoboCopy interrupt the running WinCC Runtime?
No. HoboCopy requests a VSS snapshot, which freezes I/O for typically 300 to 800 ms. WinCC Runtime, CCArchiveConnMon, and SQL Server continue to process values; only the disk subsystem sees a brief pause. The snapshot is then read off-line.
What is the recommended backup frequency for a WinCC V7 server?
Daily full mirror + 24 hourly incrementals is the common baseline. For plants with heavy archive churn (process values every second across 10 000 tags), raise the full backup to twice per day and use 15-minute incrementals overnight.
Why does FreeFileSync skip files held by CCArchiveConnMon.exe?
CCArchiveConnMon from the WinCC Connectivity Pack holds an exclusive handle on the archive MDF/LDF that the FreeFileSync VSS request cannot read. Either switch to HoboCopy, or stop the CCArchiveConnMon service for the duration of the backup and start it again afterwards.
Can I back up to a USB drive formatted as exFAT?
No. exFAT does not support NTFS alternate data streams used by VSS, and the VSS requester will fail with 0x80042313. Format the destination drive as NTFS or use a network share on an NTFS volume.
Do I need the Visual C++ 2010 runtime on Windows Server 2019?
HoboCopy links against MSVCR100.dll. Modern Windows releases include the 2015-2022 redistributable but not 2010. Install vcredist_x86.exe for Visual C++ 2010 on the WinCC server, even if WinCC itself is 64-bit, because HoboCopy is a 32-bit binary.