Skip to main content

Destroy the data of a server

info

This page is for support and IT staff. Most of its steps need an administrator command prompt on the server and the PostgreSQL tools.

When a YTCC server is taken out of service, its configuration, plant history and the personal data of its users have to be destroyed. YTCC keeps them in PostgreSQL databases and in several folders. This page lists all of them; the paths are relative to the installation folder, for example C:\ytcc\v15, C:\YTCC or D:\YTCC\v13.

Before you begin​

  • Back up what you still need, for example to move a project to another server: see Backup and restore.
  • You can open PowerShell as administrator and you know the password of the PostgreSQL user postgres.

Steps​

1. Stop YTCC and remove its start with Windows​

Stop the YTCC service in Services, or remove YTCC first as described in Uninstall YTCC. No YTCC process may run while you delete its data.

2. List the YTCC databases​

All YTCC database names begin with scada_. In psql, list them:

SELECT datname FROM pg_database WHERE datname LIKE 'scada\_%';
DatabaseName
Registryscada_registry, in a version folder scada_<ID>_registry
Project database: drivers, devices, signals, alarms, configuration changesscada_proj_<project> or scada_<ID>_proj_<project>
History database: archived values, alarm and event recordsscada_hist_<project> or scada_<ID>_hist_<project>

.\scada-manager version --json shows the project and history database of every project of one installation.

3. Delete the databases​

Delete each YTCC database, for example:

dropdb -U postgres scada_hist_pump_station

For versions installed side by side, version purge deletes the databases and the folder of another version in one step (see Upgrade to a new version and roll back).

warning

Deleting a database cannot be undone. Check the list of step 2 before you delete.

4. Delete the installation folder​

Delete the whole installation folder as administrator. It contains:

PathContents
apps\projects-server\data\projects\Projects with screens and images; the secrets folders with driver keys and certificates
apps\projects-server\data\auth\Users, password hashes and sessions of every project; the server administrator account and its sessions (_srv.json, _srv.sessions.json); the server administrator list of upgraded servers (_server.json)
apps\projects-server\data\audit\User audit logs, including that of the server administrator account (_srv.jsonl)
apps\projects-server\data\setup.jsonRecord of the first-run setup: when the licence agreement was accepted, which text and by which account
apps\projects-server\data\backups\Automatic backups of the screen editor; in exports the project backups taken on the home page, with password hashes
apps\projects-server\data\lastvalue\Last-value store: the last value of every signal
apps\projects-server\data\prefs\Display and table preferences of the users
apps\projects-server\data\assets\Shared images
apps\projects-server\.envSession key of the projects server
data\nats\Message bus store: values of internal signals, script state, events and history not yet written
data\manager-state.jsonThe project started last
data\control.keyControl key of the process manager
logs\Logs of the process manager, audit.jsonl
backups\Project backups made with scada-manager backup and project adopt
data\backups\Project backups that the setup program took before upgrading the databases (yukseltme-<time>)
config\manager.tomlThe PostgreSQL connection, with its password in a package installation
config\secrets.tomlThe PostgreSQL password of an installation made with the setup program
reserve.binReserve file of the disk protection

For versions installed side by side, also delete the folder runs in the installation root, for example D:\YTCC\runs.

5. Delete the data outside the folder​

Check where these settings point, and delete those folders too:

  • SCADA_DATA_DIR environment variable: data folder of the projects server instead of apps\projects-server\data.
  • last_value_dir in config\gateway.toml: last-value store.
  • nats_store_dir in config\manager.toml: message bus store.

Also delete:

  • Backup files written to another place with scada-manager backup --out or to a folder chosen on the home page, and pg_dump files of the databases.
  • C:\ytcc-yedek (on the system drive): the backups that the setup program took when it removed an installation. They contain the projects with their users and password hashes, and a copy of the config folder with the database password.
  • Folders written with scada-manager script export.
  • The message bus store of older YTCC versions, in the nats\jetstream folder of the temporary folder of the Windows account that ran YTCC. For the SYSTEM account this is C:\Windows\Temp\nats\jetstream or C:\Windows\System32\config\systemprofile\AppData\Local\Temp\nats\jetstream.

If the PostgreSQL server was used only for YTCC, you can also uninstall it together with its data folder.

Result​

The query of step 2 returns no rows, the installation folder is gone and none of the folders of step 5 is left.

Good to know​

  • This page is the secure disposal guideline that IEC 62443-4-1 (SG-4) asks product suppliers to provide.
  • The personal data among these records are listed in Personal data.