Appearance
Backup and restore
What needs backing up
Everything that matters is in one place — the data directory:
| Contents | Why it matters |
|---|---|
raylux_project.json | Your entire configuration: tags, devices, screens, alarms, users, reports. |
| Historian databases | Recorded process history. Usually the largest and the least replaceable. |
| Audit log | Who changed what, and who wrote to which tag. |
| Secrets | Encrypted credentials for devices, email and databases. |
certs/ | TLS certificate and private key. |
Backing up the program files is pointless — reinstall gets those.
Taking a backup
The reliable method is to stop Nexus and copy the directory. The historian uses SQLite, and copying a database that is being written to can capture it mid-transaction.
powershell
sc stop RayluxNexus
$stamp = Get-Date -Format 'yyyy-MM-dd'
Copy-Item 'C:\ProgramData\Raylux' "D:\Backups\Raylux-$stamp" -Recurse
sc start RayluxNexusbash
sudo systemctl stop raylux-nexus
sudo tar czf "/backups/raylux-$(date +%F).tar.gz" -C /var/lib raylux
sudo systemctl start raylux-nexusThat is an outage, so most sites run it nightly out of hours.
Configuration alone, without an outage
An administrator can download a configuration backup from Nexus's web interface while it runs. That captures your configuration but not the historian, so treat it as a change-control snapshot to take before editing something — not as your backup.
Note that a downloaded configuration backup has user password hashes redacted. Restoring it puts the real hashes back from Nexus's own records; it does not carry credentials between machines.
Restoring
The whole Nexus
- Install the same version of Raylux that the backup came from.
- Stop Nexus.
- Replace the data directory with your backup.
- Start Nexus.
Restore into the same version
Nexus refuses to start on a configuration written by a newer version than itself. Restoring a newer backup onto an older build will not work — install the matching version first.
Configuration only
Upload a configuration backup from Nexus's web interface. It replaces the running configuration.
Some settings re-apply immediately and some need a restart. Restart Nexus after a configuration restore rather than working out which.
Verify your backups
An untested backup is a hope, not a plan. At least once, restore onto a spare machine or a VM and confirm Nexus starts, the screens load and history is present. Do this before you rely on it, not after you need it.
What is not covered
- No automatic scheduled backups. Use your normal backup system, or a scheduled task around the commands above.
- No incremental historian backup. A copy is a full copy, which matters once the historian is large.