Migrating Flussonic Watcher to a new server¶
Migrating the management server includes the database, file configuration and address used by clients and streamers. An SQL dump alone does not transfer the video archive.
The procedure below retains the installation variant and Watcher version. Moving the local archive of a single-server installation requires copying storage separately. Test changing the installation variant during migration on a copy first.
Prepare the new server¶
- Record the installed package type and version:
flussonic-watcherwith a local streamer orwatcher-standalonewithout one. Record dependency versions. - Prepare the new server, DNS and network. Check that it can reach existing streamers and storage.
- Install the same Watcher variant and version. Do not route production traffic to the new server until migration is complete.
- Create a verified database backup of the old server and save
/etc/watcher,/etc/centraland, for a node with a localwatcher-streamer,/etc/flussonicconfiguration.
Do not replace the new server configuration wholesale without checking it. PostgreSQL addresses, ports, local paths and HTTP(S) settings may differ. If the database is on another server, arrange its migration separately: the standard restoration script targets local PostgreSQL in a package installation.
Perform a trial restoration¶
Restore the backup in an isolated environment that does not send changes to active streamers. Check sign-in and the Organization list, then camera and user settings. Check that restoration and startup fit within the allowed maintenance window.
Do not run two management servers with the same restored configuration to manage the same streamers simultaneously. They can independently send settings and process background jobs.
Switch management¶
- Announce a maintenance window and stop data changes on the old installation.
-
Stop services that write data and synchronize the cluster:
systemctl stop watcher-scheduler watcher-job-runner@1 watcher-job-runner@high \ watcher-go watcher-episodes watcher-vms central central-layouter -
Make a final database backup on the old server. PostgreSQL must remain running for this. Transfer the backup securely to the new server and verify its checksum.
-
Before restoration on the new server, apply the verified file configuration with its database address and paths. Maintain network isolation from active streamers and external clients: after successful restoration, the restoration script starts Central and Watcher services itself. Restore the final backup following the restoration instructions, then stop services on the new server again:
systemctl stop watcher-scheduler watcher-job-runner@1 watcher-job-runner@high \ watcher-go watcher-episodes watcher-vms central central-layouterBefore removing isolation, check that the old management server remains stopped. Stopping only after restoration without network isolation leaves an interval in which restored settings can reach active streamers.
-
Prepare Central configuration and its database, start Central and check readiness. Run the commands on the new server in Bash as root; stop the cutover on any error:
( set -e /opt/flussonic/bin/watcher-central-reconf.sh CENTRAL_DIR=/opt/central CENTRAL_CONFIG_PATH=/etc/central/central.conf \ /opt/central/bin/central --migrate systemctl restart central systemctl restart central-layouter )For a
flussonic-watcherinstallation with a local streamer, also run this before checking Central readiness:systemctl restart flussonicThis applies local media layer proxy settings. Skip this step for
watcher-standalone.Check Central readiness:
( set -e set -a . /etc/watcher/watcher.conf set +a /opt/flussonic/bin/service-health-check.sh central "$CENTRAL_URL" )watcher-central-reconf.shchecks the Watcher database and writes configuration. It does not restart Central; synchronization before migration, restart and readiness verification may use the old configuration.Once Central is ready and old management is stopped, allow only the new server to access streamers and run:
/opt/flussonic/bin/watcher-sync.shFor
watcher-standalone, restartangieafter successful synchronization.Check synchronization results and
sync_central.log.gzif the script reports saving it. After successful verification, start the management service for your installation variant and background services, then switch DNS or the incoming proxy. Client traffic must remain blocked until then. -
Check name resolution from client networks and streamers.
To start a package installation, use its management service: flussonic-watcher or watcher-standalone. Also check that watcher-vms, watcher-go, Central and background services actually start; the management service status alone does not prove that all components work.
Verify the result¶
- Sign-in and permissions — an ordinary user sees only assigned cameras.
- Cluster — streamers are available and camera settings match expectations.
- Live video — opens from an external client network.
- Archive — old intervals are available and new recordings appear.
- Background features — required jobs run and events are generated.
- Addresses — links, certificates and video delivery addresses match the DNS names used.
If the management server also stored video, transfer archive files and their metadata separately, keeping paths and DVR settings consistent. Restoring the database does not restore deleted video recordings.
Keep management disabled on the old server until verification is complete. To roll back, stop the new installation and assess changes made since cutover: simply starting the previous database will lose those changes. Agree on a single data source before switching back.