Disaster recovery

The commands for each restore live in Backup and restore. This page gives the order on a new host. Run every command as root.

Warning

Keep the old host powered off or off the network. Two hosts writing one data set corrupt it.

Have this ready before you need it

ItemWhere it comes from
datamind-installer-db-<date>.sqlBackup and restore, Back up, step 1
datamind-installer-secrets-<date>.tgz, taken with the same dumpBack up, step 2
datamind-installer-files-<date>.tgzBack up, step 3
datamind-installer-version-<date>.txtBack up, step 4
/root/datamind-backup/os-<date>/: one archive per volume and per host directory, plus volumes.txt and hostdirs.txtBack up DataMind OS data
The client_id and client_secret (the client_secret is also the Azure client secret)Issued by DataMind with your licence
The host name users reach, its DNS record, and the certificate and key files set in SSL_CERT_PATH and SSL_KEY_PATHYour own DNS and certificate authority

Restore the DataMind Installer

Bring the new host to the System requirements. Then run the Restore steps of Backup and restore in order, skipping the steps marked same host only.

Always start the DataMind Installer with docker compose in /opt/delamain, as the restore steps do. Started any other way, its own update cannot find the install directory.

Check it worked. The health check answers {"status":"ok","db":"up"}, and you can sign in with an existing account.

Restore the DataMind OS data

Restore every DataMind OS volume and host directory before the deployment's first start on the new host. Follow Restore DataMind OS data, skipping the step marked same host only.

Check it worked. docker volume ls lists every name in volumes.txt.

Start the deployment

The new host has none of the DataMind OS images yet, so Start on Status stays unavailable until they are pulled. Choose one of two ways.

WayWhat it doesUse it when
Pull on the host, then StartUses the Compose file from your backup. Brings back the version you backed upYou want the same version as before
Update on StatusDownloads the newest Compose file and template, then pulls and startsYou also want the newest release, and you have read its Release Notes

To bring back the version you backed up, pull the images:

bash
cd /opt/delamain/deployment
docker compose pull

Then click Start on Status. Start uses the restored Compose file and sets the memory limits for this host.

Check it worked. Every long-running service shows Up, as in Updating.

Check the address

If the host name or address changed, set the platform address again in Configuration, then use Apply changes. DNS and the certificate must match the new name. See TLS and certificates.

Check it worked. After Apply changes, the toast Configuration applied appears, and the deployment's .env holds the new address:

bash
grep '^PLATFORM_URL=' /opt/delamain/deployment/.env

Verify what users see

Sign in to DataMind OS and open a query your users rely on.

Check it worked. The Platform URL opens the DataMind OS Welcome back! sign-in page, an existing account signs in, and the query shows data up to the time of your last DataMind OS data backup.

Questions, answered

Should I click Update to start the restored deployment?

Only if you want the newest release. To get back the version you backed up, pull on the host and click Start, as in Start the deployment.

Why is Start unavailable on the new host?

The images are not on the host yet. See Start the deployment.