IMDTouchKnowledge BaseShop main store

Troubleshooting

Why a WinCC Project Backup Fails While Runtime Is Running

HMI and touchscreens Published 6 min read By IMDTouch engineering team

Short answer

WinCC Runtime holds the project database files open, so a plain file synchronizer skips them and leaves a backup that hangs WinCC Explorer on a blank window. For an online copy use the released Copy WinCC Project tool; otherwise stop Runtime and copy in a maintenance window, then validate by opening the copy.

On this page
  1. What Runtime locks and why a plain copy fails
  2. The two supported ways to get a usable backup
  3. Worked example: a file-set check that rejects a failed copy
  4. Validating the backup: transfer success is not usability
  5. Troubleshooting list
  6. The decision for each situation
  7. Questions asked

A file-level copy made while WinCC Runtime is running is not a backup. Runtime holds the project databases open, so the synchronizer skips the four database files, and the resulting folder opens as a blank, hanging WinCC Explorer. The fix is procedural, not a file trick: use the released Copy WinCC Project tool for an online copy, or stop Runtime and copy during a maintenance window, and never repair the copy by deleting lock files.

What Runtime locks and why a plain copy fails #

WinCC Runtime keeps the project databases open while it reads process data and writes runtime changes. The affected file set is four files named after the project:

  • the project data file, projectname.MDF
  • the project transaction log, projectname.LDF
  • the runtime data file, projectnameRT.MDF
  • the runtime transaction log, projectname.RT.LDF

The .MDF files carry database data; the paired .LDF files carry the transaction log that makes the data recoverable. A generic synchronizer works at the filesystem level and cannot coordinate the database state, so it reports a sharing violation or skips each open file. A destination that holds the scripts, pictures and configuration but none of the four database files is structurally incomplete. Even a copy that catches all four at unrelated instants can produce a data file and a log that do not belong to the same recoverable point.

Deleting a lock file does not fix any of this. A lock file only signals that a process owns the project; removing it copies no data, flushes no transactions and creates no consistent data-and-log pair. A folder made usable by deleting *.lck files was never a complete backup, and if Runtime is still running elsewhere the lock belongs to a live process. If a project will not open at all after a bad copy or a crash, the recovery path is the one described in when an HMI project fails to open — diagnose, then rebuild the backup properly.

The two supported ways to get a usable backup #

Online copy: the released Copy WinCC Project tool. The vendor documents an external WinCC tool, Copy WinCC Project, that saves the complete project including all databases while Runtime stays in operation. It is tested and released with WinCC, which is the deciding property: an unsupported utility may seem to work, but any resulting problem falls outside vendor support. Follow the procedure for your installed WinCC release and write the result to a destination that is not your last known-good backup, so validation cannot destroy it.

Offline copy: a maintenance window. Stop Runtime and every process using the project, confirm the databases are no longer open, then archive the whole project folder — a ZIP of the folder is the documented practice. With Runtime stopped, no file is locked and an ordinary filesystem copy produces a coherent project. This is an offline copy and costs you Runtime downtime; it is not a substitute for the online method on a line that must keep running.

Do not leave the running source project altered in either case: no manual detaching of databases, no deleting of source lock files to make a synchronizer succeed.

Worked example: a file-set check that rejects a failed copy #

Case: a nightly sync of the project Line1 while Runtime ran, and the copy hangs WinCC Explorer.

Inputs, and where each comes from: the four database file names expected for a WinCC project (the documented naming pattern above, applied to this project); the source folder listing; the synchronizer log.

The rule in words: a usable project backup contains the complete four-file database set with the source names, and the log shows no skipped or sharing-violation results. Count what is missing.

The arithmetic:

  • Expected database files at the source: 4 — Line1.MDF, Line1.LDF, Line1RT.MDF, Line1.RT.LDF
  • Present at the source: 4
  • Copied to the destination per the log: 3 (Line1RT.MDF skipped, sharing violation; the other two database files plus configuration copied)
  • Missing at the destination: 4 − 3 = 1

The result: the destination has 3 of 4 database files, so it is incomplete. Sharing violations and skipped-file entries in the log are the mechanism, and the blank WinCC Explorer on open is the symptom.

The decision, with its threshold: any missing database file — even one — rejects the copy. Do not reopen the folder, do not delete lock files; discard this destination and make a new backup with the released copy tool or in a stopped-Runtime window.

Validating the backup: transfer success is not usability #

File sizes and modification times detect truncation and stale copies, but neither proves the database is recoverable. Accept the destination as a backup only after these checks:

  • The four database files exist at the destination under the source project's exact names.
  • The operation log shows no skipped-file, sharing-violation, access-denied or retry-exhausted result for any project file.
  • The copy opens in WinCC Explorer from its own destination path, and the project tree loads — a blank or hanging window is a failed validation.
  • Representative screens, tags and archives required by the application read correctly from the copy.
  • A restore test in an isolated location opens independently and cannot interfere with the production project.

A blank Explorer after opening a copy that lacks database files is end-stage: reopening the same incomplete directory cannot recreate omitted databases, so replace the backup rather than troubleshooting the user interface.

Troubleshooting list #

  • Runtime was active during the sync. The open database files explain every skip. Redo the copy with the released tool or stop Runtime first.
  • Runtime was stopped, but the copy is still incomplete. Look at filtering rules, permissions or an interrupted transfer in the log; the open-file mechanism is not the cause.
  • Runtime state unknown. The copy has no defensible consistency point. Repeat it with the state recorded, or use the released online method.
  • One or more database files missing at the destination. Reject the copy outright; one missing log file is enough.
  • All four files present but copied while Runtime ran. Presence alone does not prove transaction consistency; validate by opening and restoring, or redo the copy with the released tool.
  • Blank or hanging WinCC Explorer on the copy. Check the destination file set first. If databases are missing, replace the backup; if all are present, keep the folder and read the WinCC and operating-system logs for database attachment or recovery errors.
  • *Told to delete .lck files. Refuse as a backup method. A stale lock may block access only after the owning process has stopped and the databases are known intact; deleting it never restores missing content.
  • Source project altered to make a sync succeed. Stop. The running source must stay untouched; the backup method changes, not the source.
  • The only previous good backup is at risk. Write every new copy attempt to a separate destination so validation cannot overwrite the last known-good state.

The decision for each situation #

  • The machine can tolerate downtime: stop Runtime, confirm the databases are closed, archive the project folder. This is the simplest supported backup and needs no extra tool.
  • Runtime must keep running: use the released Copy WinCC Project tool and validate the result by opening and restoring it. Do not substitute a free synchronizer for it.
  • A copy was already made while Runtime ran: treat it as incomplete, check the four-file set and the log, and expect to discard it.
  • Someone offers lock-file deletion as the fix: decline. It masks the symptom and leaves you with a folder that was never a backup. If the underlying project itself will not open, the recovery paths in why WinCC runtime reports project is locked cover the legitimate way to clear a genuine lock.

One safety note: stopping Runtime to take an offline backup is a controlled stop. Follow the machine's own stop and restart procedure, and confirm the line is in a safe state before Runtime goes down.

Questions asked

Which files does WinCC Runtime lock during a backup?

Runtime keeps the project databases open, so a filesystem copy typically skips four files: the project data file with the .MDF extension, its transaction log with the .LDF extension, and the two runtime counterparts, the RT .MDF data file and the RT .LDF log. Without all four, the copied folder is not a usable project.

Can I delete the .lck files to make a failed WinCC copy work?

No. A lock file only signals that a process has the project open. Deleting it does not copy the missing database content or flush pending transactions, so the destination stays structurally incomplete. Remove the open-file condition instead: use the released copy tool or stop Runtime before copying.

How do I back up a WinCC project while Runtime is running?

Use the vendor-released Copy WinCC Project tool, which is designed and tested to save the complete project including its databases during Runtime operation. A generic synchronizer has no way to coordinate the database state, so any free utility that copies files one by one is not a supported method and gives no vendor support when it fails.

How do I prove a WinCC backup is usable?

Do not trust the transfer report. Check that all four database files exist at the destination under the source names, read the copy log for skipped or sharing-violation results, open the copy in WinCC Explorer from its own path, and restore it in an isolated folder that cannot touch the production project before you rely on it.

The copy opens a blank WinCC Explorer. Can I fix that folder?

Usually no. If the destination lacks the .MDF or .LDF files, no amount of reopening recreates the omitted databases; replace the backup with a proper copy. If every database file is present but the Explorer still hangs, keep the folder for diagnosis and read the WinCC and operating-system logs rather than deleting lock files.

Keep reading

  • Troubleshooting

    Why WinCC Runtime Reports Project Is Locked and How to Recover

    "Project is locked" in WinCC Runtime is an ownership conflict, not a license fault: a live session, or a stale ProjectOpened.lck left behind by a crash or power loss, still claims the project. Close every session that could own it, back it up, then clear the lock with reset_wincc.vbs or by removing ProjectOpened.lck; on a client, open the project by its UNC path.

    HMI and touchscreens

  • How-to

    Running a WinCC 7.0 project on another PC without a new build

    No. WinCC has no compile-to-EXE option: the destination PC needs WinCC Runtime of version 7.0 or higher, installed and licensed, and you transfer the project files to it. A newer WinCC opens and converts the project; an older release will not open it.

    HMI and touchscreens

  • How-to

    Deploy a WinCC 6.2 Project on a Separate Runtime PC

    Install WinCC 6.2 on both machines: Runtime installs with the same setup, so there are no separate runtime files to carry. License the desktop PC that activates the project, copy the whole project folder to it, register the folder in AutoStart, and build the job as a Single-User Project.

    HMI and touchscreens