Skip to content

Restore from a backup

This page explains how to bring a lost QubeSight server back on a new machine from its backup location and backup passphrase: what you need, the web installer's Restore from backup path, the equivalent install.sh --restore-from command, how a cluster node returns to its own place, and what does and does not come back.

Community Enterprise

Backup and restore are available in both editions. Returning a node into a high-availability cluster requires the Enterprise cluster feature. For the background, see High availability and disaster recovery and Backup and restore.

What you need

Item Where it comes from
A new server prepared like any installation See Installation. The QubeSight release must be at least the version that took the backup.
The backup location of the lost system Either the locked store (Object Lock S3 or MinIO bucket) or the SFTP server set in Platform → Data and Backup → Backup settings
Access to the backup location Locked store: address, bucket, access key and secret key. SFTP: server, port, user, password, backup folder and the server's SSH host key fingerprint.
The backup passphrase of the lost system Set at installation or in Backup settings. If none was ever set, the default passphrase is used and you leave the field empty.

The backup passphrase opens a sealed key descriptor stored at the backup location, which carries the lost server's root keys (GUARDIUM_SECRET_KEY, QUBESIGHT_MFA_KEY, BACKUP_ENCRYPTION_KEY). No separate recovery file is needed.

The locked store must be on another server

If the lost server kept its cold storage in a local MinIO on the same machine, the locked store was lost with it. Restore then needs an SFTP backup location, or a locked store on a separate server or in S3.

Restore with the web installer

Start the web installer on the new server and choose Restore from backup on the Type step. The steps are Type → System → Backup → Network → Components → Load → Summary → Install → Done.

Backup step

Backup location and passphrase: enter where the source system wrote its configuration backups and the passphrase of those backups. The latest backup is used.

Field Default Notes
Backup location Locked store (MinIO / S3) Locked store (MinIO / S3): the Object Lock bucket holding the activity data and configuration backups. SFTP: the Linux server the configuration backups were written to; recent days' data is still read from the locked store recorded in the restored settings when it is reachable.
Store address (HOST:PORT) Locked store. Typing https:// selects HTTPS. No underscore in the name.
Bucket qubesight-worm Locked store
Connect over HTTPS off Locked store served over TLS
Access key, Secret key Locked store; required
SFTP server SFTP
Port 22 SFTP
User SFTP
Password SFTP; required
Backup folder (absolute path) SFTP; the folder from the source system's Backup settings, for example /srv/qubesight-yedek
Server key fingerprint (SHA256) SFTP. On the server: ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub. No connection is made if it does not match.
Backup passphrase The passphrase set on the source system, not a new one. Leave empty if none was set: the default passphrase is tried. It is handed only to the installation process, never written to .env, a command line or browser storage.
Recent days to load into ClickHouse value from the backup Optional, 7 to 3650. Empty uses the hot-day setting of the restored system; older data is read from the locked store in reports.

The step reminds you what is restored: users and their passwords, integrations, hot and cold data settings and backup settings. That is why the administrator, data retention and a new backup passphrase are not asked; after the installation you sign in with your account from the backed-up system.

Test the backup connects to the backup location, opens the latest backup with the passphrase and reports:

Result Meaning
Backup opened: backup name, source host, version The passphrase is correct; continue
Wrong passphrase Enter the passphrase set on the source system
Could not connect or access denied Check address, port, HTTPS, keys or user, password
Host key mismatch The SFTP server presented a different key, shown in the message
No usable configuration backup Check the bucket or folder
Backup taken with a newer version The message names the minimum installation package version needed; this package cannot restore it
No image to test with On an online installation the images are built later; the details are tried in the Opening the backup stage

When the test succeeds, it also tells you this server's place in the cluster (see below) and the version that took the backup, and fills the Network and Components steps from the installation settings stored in the backup. You can still change them.

With Locked store (MinIO / S3) selected, the Backup step shows Store address (HOST:PORT), Bucket, Connect over HTTPS, Access key, Secret key and Backup passphrase. A successful Test the backup shows the backup name, source host and version, and this server's place in the cluster.

Summary and confirmation

The summary shows the installation type, the backup location, whether a passphrase was entered (never the value), the days loaded into ClickHouse, the place in the cluster and the version that took the backup. If the machine already has an installation, it warns that the restore replaces the configuration database.

When the server returns into a cluster place, the summary asks you to Confirm the product SSH key from the backup: the fingerprint and comment of the cluster's product key, which the cluster nodes use to connect to this server as root. Someone who can write to the backup location could have planted a fake backup with their own key, so compare the fingerprint with Platform → System and Cluster → Cluster (product identity) on a running node before ticking I verified the fingerprint: add this key to the root account. If the backup could not be read before the installation, the same question appears on the progress screen and the installation waits for your answer (up to 30 minutes).

Install stages

In addition to the normal stages, a restore shows Opening the backup, Finding the place in the cluster, Returning to its place in the cluster (data from the cluster) for a rejoin, and Restoring settings, users and keys. If the backup cannot be opened, Fix backup details takes you back to the Backup step.

Done

QubeSight is restored from the backup: settings, users and keys are restored and all services are healthy. Sign in with the user name and password that were valid on the backed-up system; MFA and SSO settings came from the backup too. The temporary password generated for the first start is not used and not shown.

Restore with install.sh

cd /opt/qubesight
export QUBESIGHT_BACKUP_PASSPHRASE="$(cat /root/qs-backup.pass)"
export QS_RESTORE_S3_ACCESS_KEY="$(cat /root/restore-access)"
export QS_RESTORE_S3_SECRET_KEY="$(cat /root/restore-secret)"
sudo -E ./install.sh --yes --public-host 192.0.2.21 \
  --restore-from minio --restore-endpoint 198.51.100.20:9100 --restore-secure \
  --restore-bucket qubesight-worm

From SFTP:

export QUBESIGHT_BACKUP_PASSPHRASE="$(cat /root/qs-backup.pass)"
export QS_RESTORE_SFTP_PASSWORD="$(cat /root/sftp.pass)"
sudo -E ./install.sh --yes \
  --restore-from sftp --restore-sftp-host 198.51.100.40 --restore-sftp-port 22 \
  --restore-sftp-user qsbackup --restore-sftp-path /srv/qubesight-yedek \
  --restore-sftp-host-key SHA256:AbCdEfGhIjKlMnOpQrStUvWxYz0123456789abcdefg
Option Meaning
--restore-from minio\|sftp Restore from the locked store or from SFTP
--restore-endpoint HOST:PORT, --restore-bucket NAME, --restore-secure Locked store address, bucket (default qubesight-worm) and HTTPS
QS_RESTORE_S3_ACCESS_KEY, QS_RESTORE_S3_SECRET_KEY Environment variables with the locked store's access key and secret key
--restore-sftp-host, --restore-sftp-port, --restore-sftp-user, --restore-sftp-path, --restore-sftp-host-key SFTP location (port default 22; host key as SHA256:...)
QS_RESTORE_SFTP_PASSWORD Environment variable with the SFTP password
--restore-hot-days N Days loaded into ClickHouse (7 to 3650); default: the restored hot-day setting
--trust-backup-ssh-key SHA256:... Expected fingerprint of the product SSH key in the backup (also QUBESIGHT_TRUST_BACKUP_SSH_KEY). The key is added to root only if the fingerprint matches; otherwise the installation stops. Without it, an unattended installation does not add the key. Valid only with --restore-from.

The other --restore-* options are accepted only together with --restore-from. Without --yes and without QUBESIGHT_BACKUP_PASSPHRASE, the script asks for the passphrase (an empty answer tries the default). Installation settings stored in the backup (ports, listen address, time zone, Guardium archive restore component, server address and, on a single server, the virtual IP) are applied for every option you did not give. A virtual IP from the backup is skipped with a warning when it is not in this server's subnet or is in use.

What happens during a restore

  1. The backup is opened with the passphrase and the source server's root keys are written to .env before any service starts.
  2. A plan decides this server's place (see below). If the backup was taken with a newer schema than this package knows, the installation stops here, before any service starts, and names the package version required.
  3. Services start. The worker and the SNMP receiver are stopped while the configuration database is restored from the backup (seconds), then started again.
  4. The ClickHouse data comes back in the background after the installation: the ClickHouse backup, then blocks written to the locked store after it, or the last N hot days from the locked store. With an SFTP location, the ClickHouse tables come from the SFTP stream backup and the activity rows from the locked store when reachable, otherwise from the daily SFTP log copies.
  5. Until the background job finishes, the system is in restore mode: a banner on every page shows the progress; incoming logs wait in Kafka (nothing is lost); dashboards and reports may be incomplete; alert evaluation, notifications, sensitive-data scans, archive export, scheduled backups and disk protection pause. Failed attempts are retried after 30 seconds, 2, 5 and 15 minutes; after the fifth failure the job is marked failed, restore mode ends, and an administrator can use Retry in the banner.
  6. If the restore was already completed once, re-running the installation does not load the backup a second time.

After a standalone restore, this server is the primary. Scheduled backups stay on if they were on at the source; check Platform → Data and Backup → Backup settings.

Cluster-aware restore

Each backup carries the cluster definition: every node's name, address, role, numbers and installation settings. When the restored server's address matches a node in that definition, it comes back in its own place.

Situation What happens
No cluster in the backup, or this address is not in it Standalone: the server comes back as a single server; data comes from the backup.
This server is in the cluster definition and no full node of the cluster is running First node back: data comes from the backup and the cluster reopens with this server under its own name and numbers. The other nodes keep their places and show as unreachable on the Cluster tab; restore them too and they rejoin in their places. The cluster job starts by itself when the ClickHouse data is back.
This server is in the cluster definition and the cluster is running Rejoin: nothing is restored from the backup. The installation leaves a "return me to my place" request in the cluster; a cluster control plane sets this server up in its place and syncs settings, users and logs from the cluster. Network and Components are not asked; their values come from the cluster.

For first node back and rejoin, the product SSH key from the backup must be added to the root account (see the confirmation above). Without it a rejoin stops (no service joins the cluster), and a first node back runs as a single server until the key is added by hand.

The final page for a rejoin says The server rejoined the cluster and links to the Cluster tab. See Cluster operations and the cluster map.

What does not come back

  • Configuration changes made after the last configuration backup (RPO equals the backup interval).
  • Activity blocks not yet written to the locked store (roughly the last 10 minutes).
  • Guardium live rows not yet finalized when the last ClickHouse backup was taken (finalization window 36 hours by default). The next day's Guardium archive brings them back.
  • Anything on the lost server that is not in PostgreSQL or the locked store, such as manual changes to files on the host.

Limitations

  • The installation package must be at least the version that took the backup.
  • A locked store on the lost server itself cannot be used for the restore.
  • Restoring from SFTP log copies loads each day's copy into ClickHouse; very large days take correspondingly long.
  • Failing back to an original site is a manual repetition of the same steps in the other direction.