OPNexusdocs

Migration and emergency (cold standby)

If the OPNexus server fails, the firewalls keep running unchanged; only management, alarms and scheduled maintenance stand still. For this case you keep a cold standby: a full backup with .env and CA and a second server on which OPNexus can be installed.

Emergency (the old server is gone): set up a new server following Installation from the release bundle with the same or a newer version, then ./opnexus restore FILE --with-env --with-ca. Afterwards point the address (virtual IP, DNS name) to the new server. Unconfirmed changes whose window expired during the outage are reverted by the new server immediately: when in doubt, the old state applies.

Planned migration (both servers running): on the old server

bash
./opnexus migrate-host root@new-server            # --dir PATH if OPNexus is located elsewhere there

Prerequisites: SSH key login to the target, OPNexus installed and started there (same or newer version). The tool checks the target, stops the old server (no changes from then on), creates a full backup with .env and CA (random passphrase that only travels over the SSH connection), restores it on the target, compares the number of firewalls and reports the duration. In the lab a migration with three firewalls took 90 seconds from the pre-check to a healthy target; the way back to the old server a good 30 seconds. The old server stays stopped, not deleted: going back works with docker compose stop on the target and docker compose up -d on the old server.

To check afterwards:

  • Firewalls that open their API only to certain senders must allow the address of the new server.
  • With the management overlay firewalls dial in through a public address; it must point to the new server (the keys come with the backup).
  • Open windows of the firewall interface through OPNexus break off and are reopened.