迁移 迁移服务器要备份哪些内容
最少备份数据库、配置、画面资源和画面文件历史。换服务器时还要重新授权。
Windows 默认位置 默认安装根目录优先是 `D:\HQCONTROL`;如果 D 盘不是固定本地磁盘,会回退到 `C:\HQCONTROL`。按实际安装根目录替换盘符。
D:\HQCONTROL\config\hqcontrol.env
D:\HQCONTROL\config\hqcontrol.launcher.json
D:\HQCONTROL\config\install.manifest.json
D:\HQCONTROL\data\postgres\
D:\HQCONTROL\data\redis\
D:\HQCONTROL\screens\assets\
D:\HQCONTROL\data\screen-file-history\
D:\HQCONTROL\logs\ # 可选,排障留档
Linux 默认位置 默认安装根目录是 `/opt/hqcontrol`;如果安装时指定 `INSTALL_ROOT`,就把路径替换成实际安装根目录。
/opt/hqcontrol/config/hqcontrol.env
/opt/hqcontrol/data/postgres/
/opt/hqcontrol/data/redis/
/opt/hqcontrol/screens/assets/
/opt/hqcontrol/data/screen-file-history/
/opt/hqcontrol/logs/ # 可选,排障留档
迁移顺序 先记录旧服务器版本、`/settings`、`/license`、系统状态和画面目录;再备份 PostgreSQL、config、screens/assets、screen-file-history;新服务器安装后恢复数据,再重新处理授权。
- 不要热复制 PostgreSQL 数据目录
- 不要直接复用旧机器授权文件
- 恢复后先查系统状态,再查 Tag、画面、报警、趋势和脚本