Contents
Uninstall and migrate
Uninstall a node
On the node server, as root:
gocdn-node-uninstallThis stops and removes the node's services, program and firewall rules, but keeps its identity, config, cache and logs; re-running the install command restores the same node without a new token. Add --purge to remove everything; to reconnect afterwards you need a new token and must delete the old node in the panel. The last line is NODE_UNINSTALL_DONE; any leftovers are listed one by one.
Uninstall the controller
On the controller server, as root, run gocdn-master-uninstall. It stops and removes the controller services but keeps the database, keys and config; re-running the install command restores it. With --purge the business database, ClickHouse database, keys and config are deleted too.
--purge cannot be undone. Make sure a backup is on another machine first, especially off-box copies of the signing key and the credential encryption key.Migrate the controller to a new machine
The controller backs up the business database hourly and key ClickHouse tables daily. To migrate: install the same version of the controller on the new machine, stop the service, restore the database from a backup, and start again.
- On the old controller, pick the latest backup, copy it to the new machine, and also copy the signing key and credential encryption key.
- Install the controller on the new machine with the install command, using the same version as the old one.
- Stop the controller service and run
gocdn-master db-restore < gocdn-db-<time>.sql.gz. The last line isDB_RESTORE_DONE. - Start the service, check the data, and update the node communication address under System › Maintenance Operations to the new controller.
offsite_dir in backup.db), -until can restore to any point in time.