Skip to main content

Disaster Recovery

ftctl init generates every secret on the server, and they never leave it. That's good for security — but it means a rebuilt server cannot decrypt a restored database unless you kept those secrets.

The critical one is ENCRYPTION_KEY: it decrypts the connection credentials stored in your database. A database backup restored under a different ENCRYPTION_KEY leaves every stored connection unreadable.

Right after install: export your secrets

sudo ./ftctl secrets export --password '<passphrase>' --file factorythread-secrets.enc

Store factorythread-secrets.enc off the box, alongside your database backups. It's encrypted with the passphrase you choose — keep that passphrase somewhere separate and safe.

Pair them

A database backup and a secrets export are only useful together. Keep the latest of each in the same safe location, and re-export the secrets after any change that rotates them.

Rebuilding a lost server

On the new host, install with the same secrets so the restored database decrypts. You can do it in one step at install time:

sudo ./ftctl install \
--secrets factorythread-secrets.enc --password '<passphrase>' \
--version <ver>

…or import into an already-configured box:

sudo ./ftctl secrets import --file factorythread-secrets.enc --password '<passphrase>'

Then restore your data:

sudo ./ftctl backup restore /path/to/your-latest-dump

Because ENCRYPTION_KEY now matches the one that encrypted them, your restored connections work.

Recovery checklist

  1. Provision a host that meets the prerequisites.
  2. Get the ftctl binary.
  3. ftctl install --secrets … --password … --version <ver> (same secrets).
  4. ftctl backup restore <dump> (your latest database backup).
  5. ftctl license install --jws … if the licence isn't already in the restored data.
  6. ftctl status and verify a couple of connections in the app.

What each artifact protects

ArtifactProtects
Database backup (ftctl backup now)your flows, connections, insights, settings
Secrets export (ftctl secrets export)the ENCRYPTION_KEY that makes the backup usable
Entitlement token (entitlement.jws)your plan/limits (re-installable any time)

Keep the first two together and current. The third can always be re-issued by your account team.