ai-chatbot/migration-log.txt
Your Name e9ceedb3bf feat: 添加图片变清晰功能
- 创建 /api/enhance 路由,实现图片变清晰API集成
- 在图片标注组件中添加变清晰按钮(Sparkles图标)
- 在相册页面添加变清晰按钮
- 系统设置:将抠图设置改名为本地AI设置,添加变清晰API配置
- 支持同步和异步两种模式
- 自动上传到S3存储桶并保存到数据库
- 在相册和出图记录中显示处理后的图片
2025-12-29 00:33:12 +08:00

1187 lines
58 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

==========================================
AI Chatbot 服务器迁移脚本
==========================================
旧服务器: root@156.225.27.52:5204
新服务器: root@114.66.30.73:22
时间: Sat Dec 27 10:55:19 CST 2025
==========================================
🔍 测试服务器连接...
测试旧服务器连接...
✅ 旧服务器连接正常
测试新服务器连接...
✅ 新服务器连接正常
📦 步骤 1/9: 在旧服务器上备份数据库...
Pseudo-terminal will not be allocated because stdin is not a terminal.
Welcome to Ubuntu 24.04.2 LTS (GNU/Linux 6.14.0-33-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/pro
扩展安全维护(ESM)Applications 未启用。
332 更新可以立即应用。
这些更新中有 98 个是标准安全更新。
要查看这些附加更新,请运行:apt list --upgradable
13 个额外的安全更新可以通过 ESM Apps 来获取安装。
可通过以下途径了解如何启用 ESM Apps:at https://ubuntu.com/esm
数据库信息: ai_chatbot_user@127.0.0.1:5432/ai_chatbot
✅ 数据库备份完成: /tmp/ai-chatbot-backup/database_backup_20251227_105524.dump
-rw-r--r-- 1 root root 624M 12月 27 10:55 /tmp/ai-chatbot-backup/database_backup_20251227_105524.dump
📥 步骤 2/9: 下载数据库备份文件...
正在下载: /tmp/ai-chatbot-backup/database_backup_20251227_105524.dump
✅ 数据库备份文件已下载 (624M)
📥 步骤 3/9: 下载项目文件...
Pseudo-terminal will not be allocated because stdin is not a terminal.
Welcome to Ubuntu 24.04.2 LTS (GNU/Linux 6.14.0-33-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/pro
扩展安全维护(ESM)Applications 未启用。
332 更新可以立即应用。
这些更新中有 98 个是标准安全更新。
要查看这些附加更新,请运行:apt list --upgradable
13 个额外的安全更新可以通过 ESM Apps 来获取安装。
可通过以下途径了解如何启用 ESM Apps:at https://ubuntu.com/esm
✅ 项目文件打包完成
✅ 项目文件已下载
📥 步骤 4/9: 下载环境变量文件...
✅ 环境变量文件已下载
🔧 步骤 5/9: 在新服务器上初始化环境...
Pseudo-terminal will not be allocated because stdin is not a terminal.
Welcome to Ubuntu 24.04.1 LTS (GNU/Linux 6.8.0-48-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/pro
System information as of Sat Dec 27 02:59:52 UTC 2025
System load: 0.0
Usage of /: 1.2% of 309.95GB
Memory usage: 1%
Swap usage: 0%
Processes: 353
Users logged in: 0
IPv4 address for ens17: 114.66.30.73
IPv6 address for ens17: 240e:f7:a020:203::d:2b2
IPv6 address for ens17: 240e:f7:a020:203::d:2b1
IPv6 address for ens17: 240e:f7:a020:203::d:2b0
IPv6 address for ens17: 240e:f7:a020:203::d:2af
IPv6 address for ens17: 240e:f7:a020:203::d:2ae
* Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s
just raised the bar for easy, resilient and secure K8s cluster deployment.
https://ubuntu.com/engage/secure-kubernetes-at-the-edge
Expanded Security Maintenance for Applications is not enabled.
242 updates can be applied immediately.
128 of these updates are standard security updates.
To see these additional updates run: apt list --upgradable
Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status
New release '25.04' available.
Run 'do-release-upgrade' to upgrade to it.
Preconfiguring packages ...
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 85837 files and directories currently installed.)
Preparing to unpack .../dpkg_1.22.6ubuntu6.5_amd64.deb ...
Unpacking dpkg (1.22.6ubuntu6.5) over (1.22.6ubuntu6.1) ...
Setting up dpkg (1.22.6ubuntu6.5) ...
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 85837 files and directories currently installed.)
Preparing to unpack .../libperl5.38t64_5.38.2-3.2ubuntu0.2_amd64.deb ...
Unpacking libperl5.38t64:amd64 (5.38.2-3.2ubuntu0.2) over (5.38.2-3.2build2) ...
Preparing to unpack .../perl_5.38.2-3.2ubuntu0.2_amd64.deb ...
Unpacking perl (5.38.2-3.2ubuntu0.2) over (5.38.2-3.2build2) ...
Preparing to unpack .../perl-base_5.38.2-3.2ubuntu0.2_amd64.deb ...
Unpacking perl-base (5.38.2-3.2ubuntu0.2) over (5.38.2-3.2build2) ...
Setting up perl-base (5.38.2-3.2ubuntu0.2) ...
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 85837 files and directories currently installed.)
Preparing to unpack .../00-perl-modules-5.38_5.38.2-3.2ubuntu0.2_all.deb ...
Unpacking perl-modules-5.38 (5.38.2-3.2ubuntu0.2) over (5.38.2-3.2build2) ...
Selecting previously unselected package libjson-perl.
Preparing to unpack .../01-libjson-perl_4.10000-1_all.deb ...
Unpacking libjson-perl (4.10000-1) ...
Selecting previously unselected package postgresql-client-common.
Preparing to unpack .../02-postgresql-client-common_257build1.1_all.deb ...
Unpacking postgresql-client-common (257build1.1) ...
Selecting previously unselected package ssl-cert.
Preparing to unpack .../03-ssl-cert_1.1.2ubuntu1_all.deb ...
Unpacking ssl-cert (1.1.2ubuntu1) ...
Selecting previously unselected package postgresql-common.
Preparing to unpack .../04-postgresql-common_257build1.1_all.deb ...
Adding 'diversion of /usr/bin/pg_config to /usr/bin/pg_config.libpq-dev by postgresql-common'
Unpacking postgresql-common (257build1.1) ...
Selecting previously unselected package binutils-common:amd64.
Preparing to unpack .../05-binutils-common_2.42-4ubuntu2.8_amd64.deb ...
Unpacking binutils-common:amd64 (2.42-4ubuntu2.8) ...
Selecting previously unselected package libsframe1:amd64.
Preparing to unpack .../06-libsframe1_2.42-4ubuntu2.8_amd64.deb ...
Unpacking libsframe1:amd64 (2.42-4ubuntu2.8) ...
Selecting previously unselected package libbinutils:amd64.
Preparing to unpack .../07-libbinutils_2.42-4ubuntu2.8_amd64.deb ...
Unpacking libbinutils:amd64 (2.42-4ubuntu2.8) ...
Selecting previously unselected package libctf-nobfd0:amd64.
Preparing to unpack .../08-libctf-nobfd0_2.42-4ubuntu2.8_amd64.deb ...
Unpacking libctf-nobfd0:amd64 (2.42-4ubuntu2.8) ...
Selecting previously unselected package libctf0:amd64.
Preparing to unpack .../09-libctf0_2.42-4ubuntu2.8_amd64.deb ...
Unpacking libctf0:amd64 (2.42-4ubuntu2.8) ...
Selecting previously unselected package libgprofng0:amd64.
Preparing to unpack .../10-libgprofng0_2.42-4ubuntu2.8_amd64.deb ...
Unpacking libgprofng0:amd64 (2.42-4ubuntu2.8) ...
Selecting previously unselected package binutils-x86-64-linux-gnu.
Preparing to unpack .../11-binutils-x86-64-linux-gnu_2.42-4ubuntu2.8_amd64.deb ...
Unpacking binutils-x86-64-linux-gnu (2.42-4ubuntu2.8) ...
Selecting previously unselected package binutils.
Preparing to unpack .../12-binutils_2.42-4ubuntu2.8_amd64.deb ...
Unpacking binutils (2.42-4ubuntu2.8) ...
Selecting previously unselected package gcc-13-base:amd64.
Preparing to unpack .../13-gcc-13-base_13.3.0-6ubuntu2~24.04_amd64.deb ...
Unpacking gcc-13-base:amd64 (13.3.0-6ubuntu2~24.04) ...
Selecting previously unselected package libisl23:amd64.
Preparing to unpack .../14-libisl23_0.26-3build1.1_amd64.deb ...
Unpacking libisl23:amd64 (0.26-3build1.1) ...
Selecting previously unselected package libmpc3:amd64.
Preparing to unpack .../15-libmpc3_1.3.1-1build1.1_amd64.deb ...
Unpacking libmpc3:amd64 (1.3.1-1build1.1) ...
Selecting previously unselected package cpp-13-x86-64-linux-gnu.
Preparing to unpack .../16-cpp-13-x86-64-linux-gnu_13.3.0-6ubuntu2~24.04_amd64.deb ...
Unpacking cpp-13-x86-64-linux-gnu (13.3.0-6ubuntu2~24.04) ...
Selecting previously unselected package cpp-13.
Preparing to unpack .../17-cpp-13_13.3.0-6ubuntu2~24.04_amd64.deb ...
Unpacking cpp-13 (13.3.0-6ubuntu2~24.04) ...
Selecting previously unselected package cpp-x86-64-linux-gnu.
Preparing to unpack .../18-cpp-x86-64-linux-gnu_4%3a13.2.0-7ubuntu1_amd64.deb ...
Unpacking cpp-x86-64-linux-gnu (4:13.2.0-7ubuntu1) ...
Selecting previously unselected package cpp.
Preparing to unpack .../19-cpp_4%3a13.2.0-7ubuntu1_amd64.deb ...
Unpacking cpp (4:13.2.0-7ubuntu1) ...
Selecting previously unselected package libcc1-0:amd64.
Preparing to unpack .../20-libcc1-0_14.2.0-4ubuntu2~24.04_amd64.deb ...
Unpacking libcc1-0:amd64 (14.2.0-4ubuntu2~24.04) ...
Selecting previously unselected package libgomp1:amd64.
Preparing to unpack .../21-libgomp1_14.2.0-4ubuntu2~24.04_amd64.deb ...
Unpacking libgomp1:amd64 (14.2.0-4ubuntu2~24.04) ...
Selecting previously unselected package libitm1:amd64.
Preparing to unpack .../22-libitm1_14.2.0-4ubuntu2~24.04_amd64.deb ...
Unpacking libitm1:amd64 (14.2.0-4ubuntu2~24.04) ...
Selecting previously unselected package libatomic1:amd64.
Preparing to unpack .../23-libatomic1_14.2.0-4ubuntu2~24.04_amd64.deb ...
Unpacking libatomic1:amd64 (14.2.0-4ubuntu2~24.04) ...
Selecting previously unselected package libasan8:amd64.
Preparing to unpack .../24-libasan8_14.2.0-4ubuntu2~24.04_amd64.deb ...
Unpacking libasan8:amd64 (14.2.0-4ubuntu2~24.04) ...
Selecting previously unselected package liblsan0:amd64.
Preparing to unpack .../25-liblsan0_14.2.0-4ubuntu2~24.04_amd64.deb ...
Unpacking liblsan0:amd64 (14.2.0-4ubuntu2~24.04) ...
Selecting previously unselected package libtsan2:amd64.
Preparing to unpack .../26-libtsan2_14.2.0-4ubuntu2~24.04_amd64.deb ...
Unpacking libtsan2:amd64 (14.2.0-4ubuntu2~24.04) ...
Selecting previously unselected package libubsan1:amd64.
Preparing to unpack .../27-libubsan1_14.2.0-4ubuntu2~24.04_amd64.deb ...
Unpacking libubsan1:amd64 (14.2.0-4ubuntu2~24.04) ...
Selecting previously unselected package libhwasan0:amd64.
Preparing to unpack .../28-libhwasan0_14.2.0-4ubuntu2~24.04_amd64.deb ...
Unpacking libhwasan0:amd64 (14.2.0-4ubuntu2~24.04) ...
Selecting previously unselected package libquadmath0:amd64.
Preparing to unpack .../29-libquadmath0_14.2.0-4ubuntu2~24.04_amd64.deb ...
Unpacking libquadmath0:amd64 (14.2.0-4ubuntu2~24.04) ...
Selecting previously unselected package libgcc-13-dev:amd64.
Preparing to unpack .../30-libgcc-13-dev_13.3.0-6ubuntu2~24.04_amd64.deb ...
Unpacking libgcc-13-dev:amd64 (13.3.0-6ubuntu2~24.04) ...
Selecting previously unselected package gcc-13-x86-64-linux-gnu.
Preparing to unpack .../31-gcc-13-x86-64-linux-gnu_13.3.0-6ubuntu2~24.04_amd64.deb ...
Unpacking gcc-13-x86-64-linux-gnu (13.3.0-6ubuntu2~24.04) ...
Selecting previously unselected package gcc-13.
Preparing to unpack .../32-gcc-13_13.3.0-6ubuntu2~24.04_amd64.deb ...
Unpacking gcc-13 (13.3.0-6ubuntu2~24.04) ...
Selecting previously unselected package gcc-x86-64-linux-gnu.
Preparing to unpack .../33-gcc-x86-64-linux-gnu_4%3a13.2.0-7ubuntu1_amd64.deb ...
Unpacking gcc-x86-64-linux-gnu (4:13.2.0-7ubuntu1) ...
Selecting previously unselected package gcc.
Preparing to unpack .../34-gcc_4%3a13.2.0-7ubuntu1_amd64.deb ...
Unpacking gcc (4:13.2.0-7ubuntu1) ...
Selecting previously unselected package libstdc++-13-dev:amd64.
Preparing to unpack .../35-libstdc++-13-dev_13.3.0-6ubuntu2~24.04_amd64.deb ...
Unpacking libstdc++-13-dev:amd64 (13.3.0-6ubuntu2~24.04) ...
Selecting previously unselected package g++-13-x86-64-linux-gnu.
Preparing to unpack .../36-g++-13-x86-64-linux-gnu_13.3.0-6ubuntu2~24.04_amd64.deb ...
Unpacking g++-13-x86-64-linux-gnu (13.3.0-6ubuntu2~24.04) ...
Selecting previously unselected package g++-13.
Preparing to unpack .../37-g++-13_13.3.0-6ubuntu2~24.04_amd64.deb ...
Unpacking g++-13 (13.3.0-6ubuntu2~24.04) ...
Selecting previously unselected package g++-x86-64-linux-gnu.
Preparing to unpack .../38-g++-x86-64-linux-gnu_4%3a13.2.0-7ubuntu1_amd64.deb ...
Unpacking g++-x86-64-linux-gnu (4:13.2.0-7ubuntu1) ...
Selecting previously unselected package g++.
Preparing to unpack .../39-g++_4%3a13.2.0-7ubuntu1_amd64.deb ...
Unpacking g++ (4:13.2.0-7ubuntu1) ...
Selecting previously unselected package make.
Preparing to unpack .../40-make_4.3-4.1build2_amd64.deb ...
Unpacking make (4.3-4.1build2) ...
Selecting previously unselected package libdpkg-perl.
Preparing to unpack .../41-libdpkg-perl_1.22.6ubuntu6.5_all.deb ...
Unpacking libdpkg-perl (1.22.6ubuntu6.5) ...
Selecting previously unselected package bzip2.
Preparing to unpack .../42-bzip2_1.0.8-5.1build0.1_amd64.deb ...
Unpacking bzip2 (1.0.8-5.1build0.1) ...
Selecting previously unselected package lto-disabled-list.
Preparing to unpack .../43-lto-disabled-list_47_all.deb ...
Unpacking lto-disabled-list (47) ...
Selecting previously unselected package dpkg-dev.
Preparing to unpack .../44-dpkg-dev_1.22.6ubuntu6.5_all.deb ...
Unpacking dpkg-dev (1.22.6ubuntu6.5) ...
Selecting previously unselected package build-essential.
Preparing to unpack .../45-build-essential_12.10ubuntu1_amd64.deb ...
Unpacking build-essential (12.10ubuntu1) ...
Preparing to unpack .../46-curl_8.5.0-2ubuntu10.6_amd64.deb ...
Unpacking curl (8.5.0-2ubuntu10.6) over (8.5.0-2ubuntu10.4) ...
Preparing to unpack .../47-libcurl4t64_8.5.0-2ubuntu10.6_amd64.deb ...
Unpacking libcurl4t64:amd64 (8.5.0-2ubuntu10.6) over (8.5.0-2ubuntu10.4) ...
Selecting previously unselected package libfakeroot:amd64.
Preparing to unpack .../48-libfakeroot_1.33-1_amd64.deb ...
Unpacking libfakeroot:amd64 (1.33-1) ...
Selecting previously unselected package fakeroot.
Preparing to unpack .../49-fakeroot_1.33-1_amd64.deb ...
Unpacking fakeroot (1.33-1) ...
Preparing to unpack .../50-libcurl3t64-gnutls_8.5.0-2ubuntu10.6_amd64.deb ...
Unpacking libcurl3t64-gnutls:amd64 (8.5.0-2ubuntu10.6) over (8.5.0-2ubuntu10.4) ...
Preparing to unpack .../51-git-man_1%3a2.43.0-1ubuntu7.3_all.deb ...
Unpacking git-man (1:2.43.0-1ubuntu7.3) over (1:2.43.0-1ubuntu7.1) ...
Preparing to unpack .../52-git_1%3a2.43.0-1ubuntu7.3_amd64.deb ...
Unpacking git (1:2.43.0-1ubuntu7.3) over (1:2.43.0-1ubuntu7.1) ...
Selecting previously unselected package libalgorithm-diff-perl.
Preparing to unpack .../53-libalgorithm-diff-perl_1.201-1_all.deb ...
Unpacking libalgorithm-diff-perl (1.201-1) ...
Selecting previously unselected package libalgorithm-diff-xs-perl:amd64.
Preparing to unpack .../54-libalgorithm-diff-xs-perl_0.04-8build3_amd64.deb ...
Unpacking libalgorithm-diff-xs-perl:amd64 (0.04-8build3) ...
Selecting previously unselected package libalgorithm-merge-perl.
Preparing to unpack .../55-libalgorithm-merge-perl_0.08-5_all.deb ...
Unpacking libalgorithm-merge-perl (0.08-5) ...
Selecting previously unselected package libcommon-sense-perl:amd64.
Preparing to unpack .../56-libcommon-sense-perl_3.75-3build3_amd64.deb ...
Unpacking libcommon-sense-perl:amd64 (3.75-3build3) ...
Selecting previously unselected package libfile-fcntllock-perl.
Preparing to unpack .../57-libfile-fcntllock-perl_0.22-4ubuntu5_amd64.deb ...
Unpacking libfile-fcntllock-perl (0.22-4ubuntu5) ...
Selecting previously unselected package libtypes-serialiser-perl.
Preparing to unpack .../58-libtypes-serialiser-perl_1.01-1_all.deb ...
Unpacking libtypes-serialiser-perl (1.01-1) ...
Selecting previously unselected package libjson-xs-perl.
Preparing to unpack .../59-libjson-xs-perl_4.040-0ubuntu0.24.04.1_amd64.deb ...
Unpacking libjson-xs-perl (4.040-0ubuntu0.24.04.1) ...
Selecting previously unselected package libllvm17t64:amd64.
Preparing to unpack .../60-libllvm17t64_1%3a17.0.6-9ubuntu1_amd64.deb ...
Unpacking libllvm17t64:amd64 (1:17.0.6-9ubuntu1) ...
Selecting previously unselected package libpq5:amd64.
Preparing to unpack .../61-libpq5_16.11-0ubuntu0.24.04.1_amd64.deb ...
Unpacking libpq5:amd64 (16.11-0ubuntu0.24.04.1) ...
Selecting previously unselected package nginx-common.
Preparing to unpack .../62-nginx-common_1.24.0-2ubuntu7.5_all.deb ...
Unpacking nginx-common (1.24.0-2ubuntu7.5) ...
Selecting previously unselected package nginx.
Preparing to unpack .../63-nginx_1.24.0-2ubuntu7.5_amd64.deb ...
Unpacking nginx (1.24.0-2ubuntu7.5) ...
Selecting previously unselected package postgresql-client-16.
Preparing to unpack .../64-postgresql-client-16_16.11-0ubuntu0.24.04.1_amd64.deb ...
Unpacking postgresql-client-16 (16.11-0ubuntu0.24.04.1) ...
Selecting previously unselected package postgresql-16.
Preparing to unpack .../65-postgresql-16_16.11-0ubuntu0.24.04.1_amd64.deb ...
Unpacking postgresql-16 (16.11-0ubuntu0.24.04.1) ...
Selecting previously unselected package postgresql.
Preparing to unpack .../66-postgresql_16+257build1.1_all.deb ...
Unpacking postgresql (16+257build1.1) ...
Selecting previously unselected package postgresql-client.
Preparing to unpack .../67-postgresql-client_16+257build1.1_all.deb ...
Unpacking postgresql-client (16+257build1.1) ...
Selecting previously unselected package python3-josepy.
Preparing to unpack .../68-python3-josepy_1.14.0-1_all.deb ...
Unpacking python3-josepy (1.14.0-1) ...
Selecting previously unselected package python3-rfc3339.
Preparing to unpack .../69-python3-rfc3339_1.1-4_all.deb ...
Unpacking python3-rfc3339 (1.1-4) ...
Selecting previously unselected package python3-acme.
Preparing to unpack .../70-python3-acme_2.9.0-1_all.deb ...
Unpacking python3-acme (2.9.0-1) ...
Selecting previously unselected package python3-configargparse.
Preparing to unpack .../71-python3-configargparse_1.7-1_all.deb ...
Unpacking python3-configargparse (1.7-1) ...
Selecting previously unselected package python3-parsedatetime.
Preparing to unpack .../72-python3-parsedatetime_2.6-3_all.deb ...
Unpacking python3-parsedatetime (2.6-3) ...
Selecting previously unselected package python3-certbot.
Preparing to unpack .../73-python3-certbot_2.9.0-1_all.deb ...
Unpacking python3-certbot (2.9.0-1) ...
Selecting previously unselected package certbot.
Preparing to unpack .../74-certbot_2.9.0-1_all.deb ...
Unpacking certbot (2.9.0-1) ...
Selecting previously unselected package python3-certbot-nginx.
Preparing to unpack .../75-python3-certbot-nginx_2.9.0-1_all.deb ...
Unpacking python3-certbot-nginx (2.9.0-1) ...
Selecting previously unselected package python3-icu.
Preparing to unpack .../76-python3-icu_2.12-1build2_amd64.deb ...
Unpacking python3-icu (2.12-1build2) ...
Setting up python3-configargparse (1.7-1) ...
Setting up lto-disabled-list (47) ...
Setting up python3-parsedatetime (2.6-3) ...
Setting up python3-icu (2.12-1build2) ...
Setting up libcurl4t64:amd64 (8.5.0-2ubuntu10.6) ...
Setting up binutils-common:amd64 (2.42-4ubuntu2.8) ...
Setting up libpq5:amd64 (16.11-0ubuntu0.24.04.1) ...
Setting up libcurl3t64-gnutls:amd64 (8.5.0-2ubuntu10.6) ...
Setting up libctf-nobfd0:amd64 (2.42-4ubuntu2.8) ...
Setting up nginx-common (1.24.0-2ubuntu7.5) ...
Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service → /usr/lib/systemd/system/nginx.service.
Setting up libgomp1:amd64 (14.2.0-4ubuntu2~24.04) ...
Setting up bzip2 (1.0.8-5.1build0.1) ...
Setting up libsframe1:amd64 (2.42-4ubuntu2.8) ...
Setting up libfakeroot:amd64 (1.33-1) ...
Setting up fakeroot (1.33-1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode
Setting up gcc-13-base:amd64 (13.3.0-6ubuntu2~24.04) ...
Setting up libllvm17t64:amd64 (1:17.0.6-9ubuntu1) ...
Setting up make (4.3-4.1build2) ...
Setting up ssl-cert (1.1.2ubuntu1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/ssl-cert.service → /usr/lib/systemd/system/ssl-cert.service.
Setting up perl-modules-5.38 (5.38.2-3.2ubuntu0.2) ...
Setting up libquadmath0:amd64 (14.2.0-4ubuntu2~24.04) ...
Setting up libmpc3:amd64 (1.3.1-1build1.1) ...
Setting up libatomic1:amd64 (14.2.0-4ubuntu2~24.04) ...
Setting up python3-josepy (1.14.0-1) ...
Setting up libubsan1:amd64 (14.2.0-4ubuntu2~24.04) ...
Setting up libhwasan0:amd64 (14.2.0-4ubuntu2~24.04) ...
Setting up libasan8:amd64 (14.2.0-4ubuntu2~24.04) ...
Setting up git-man (1:2.43.0-1ubuntu7.3) ...
Setting up curl (8.5.0-2ubuntu10.6) ...
Setting up libperl5.38t64:amd64 (5.38.2-3.2ubuntu0.2) ...
Setting up libtsan2:amd64 (14.2.0-4ubuntu2~24.04) ...
Setting up libbinutils:amd64 (2.42-4ubuntu2.8) ...
Setting up libisl23:amd64 (0.26-3build1.1) ...
Setting up python3-rfc3339 (1.1-4) ...
Setting up libcc1-0:amd64 (14.2.0-4ubuntu2~24.04) ...
Setting up liblsan0:amd64 (14.2.0-4ubuntu2~24.04) ...
Setting up libitm1:amd64 (14.2.0-4ubuntu2~24.04) ...
Setting up libctf0:amd64 (2.42-4ubuntu2.8) ...
Setting up nginx (1.24.0-2ubuntu7.5) ...
* Upgrading binary nginx
...done.
Setting up cpp-13-x86-64-linux-gnu (13.3.0-6ubuntu2~24.04) ...
Setting up perl (5.38.2-3.2ubuntu0.2) ...
Setting up libgprofng0:amd64 (2.42-4ubuntu2.8) ...
Setting up python3-acme (2.9.0-1) ...
Setting up python3-certbot (2.9.0-1) ...
Setting up git (1:2.43.0-1ubuntu7.3) ...
Setting up libdpkg-perl (1.22.6ubuntu6.5) ...
Setting up certbot (2.9.0-1) ...
Created symlink /etc/systemd/system/timers.target.wants/certbot.timer → /usr/lib/systemd/system/certbot.timer.
Setting up libgcc-13-dev:amd64 (13.3.0-6ubuntu2~24.04) ...
Setting up libjson-perl (4.10000-1) ...
Setting up libstdc++-13-dev:amd64 (13.3.0-6ubuntu2~24.04) ...
Setting up binutils-x86-64-linux-gnu (2.42-4ubuntu2.8) ...
Setting up cpp-x86-64-linux-gnu (4:13.2.0-7ubuntu1) ...
Setting up postgresql-client-common (257build1.1) ...
Setting up cpp-13 (13.3.0-6ubuntu2~24.04) ...
Setting up libfile-fcntllock-perl (0.22-4ubuntu5) ...
Setting up libalgorithm-diff-perl (1.201-1) ...
Setting up gcc-13-x86-64-linux-gnu (13.3.0-6ubuntu2~24.04) ...
Setting up postgresql-client-16 (16.11-0ubuntu0.24.04.1) ...
update-alternatives: using /usr/share/postgresql/16/man/man1/psql.1.gz to provide /usr/share/man/man1/psql.1.gz (psql.1.gz) in auto mode
Setting up python3-certbot-nginx (2.9.0-1) ...
Setting up libcommon-sense-perl:amd64 (3.75-3build3) ...
Setting up binutils (2.42-4ubuntu2.8) ...
Setting up dpkg-dev (1.22.6ubuntu6.5) ...
Setting up postgresql-common (257build1.1) ...
Creating config file /etc/postgresql-common/createcluster.conf with new version
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
Removing obsolete dictionary files:
Created symlink /etc/systemd/system/multi-user.target.wants/postgresql.service → /usr/lib/systemd/system/postgresql.service.
Setting up gcc-13 (13.3.0-6ubuntu2~24.04) ...
Setting up libtypes-serialiser-perl (1.01-1) ...
Setting up cpp (4:13.2.0-7ubuntu1) ...
Setting up libalgorithm-diff-xs-perl:amd64 (0.04-8build3) ...
Setting up libalgorithm-merge-perl (0.08-5) ...
Setting up libjson-xs-perl (4.040-0ubuntu0.24.04.1) ...
Setting up postgresql-client (16+257build1.1) ...
Setting up g++-13-x86-64-linux-gnu (13.3.0-6ubuntu2~24.04) ...
Setting up postgresql-16 (16.11-0ubuntu0.24.04.1) ...
Creating new PostgreSQL cluster 16/main ...
/usr/lib/postgresql/16/bin/initdb -D /var/lib/postgresql/16/main --auth-local peer --auth-host scram-sha-256 --no-instructions
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "C.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/postgresql/16/main ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
Setting up gcc-x86-64-linux-gnu (4:13.2.0-7ubuntu1) ...
Setting up gcc (4:13.2.0-7ubuntu1) ...
Setting up g++-x86-64-linux-gnu (4:13.2.0-7ubuntu1) ...
Setting up postgresql (16+257build1.1) ...
Setting up g++-13 (13.3.0-6ubuntu2~24.04) ...
Setting up g++ (4:13.2.0-7ubuntu1) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up build-essential (12.10ubuntu1) ...
Processing triggers for ufw (0.36.2-6) ...
Processing triggers for man-db (2.12.0-4build2) ...
Processing triggers for libc-bin (2.39-0ubuntu8.3) ...
Running kernel seems to be up-to-date.
Restarting services...
systemctl restart packagekit.service
No containers need to be restarted.
No user sessions are running outdated binaries.
No VM guests are running outdated hypervisor (qemu) binaries on this host.
2025-12-27 03:01:38 - Installing pre-requisites
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Hit:1 http://archive.ubuntu.com/ubuntu noble InRelease
Hit:2 http://security.ubuntu.com/ubuntu noble-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu noble-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu noble-backports InRelease
Reading package lists...
Building dependency tree...
Reading state information...
225 packages can be upgraded. Run 'apt list --upgradable' to see them.
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
ca-certificates is already the newest version (20240203).
ca-certificates set to manually installed.
curl is already the newest version (8.5.0-2ubuntu10.6).
curl set to manually installed.
The following additional packages will be installed:
apt apt-utils dirmngr gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client
gpgconf gpgsm gpgv keyboxd libapt-pkg6.0t64
Suggested packages:
apt-doc aptitude | synaptic | wajig pinentry-gnome3 tor parcimonie
xloadimage gpg-wks-server scdaemon
The following NEW packages will be installed:
apt-transport-https
The following packages will be upgraded:
apt apt-utils dirmngr gnupg gnupg-l10n gnupg-utils gpg gpg-agent
gpg-wks-client gpgconf gpgsm gpgv keyboxd libapt-pkg6.0t64
14 upgraded, 1 newly installed, 0 to remove and 211 not upgraded.
Need to get 2580 kB/4872 kB of archives.
After this operation, 47.1 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libapt-pkg6.0t64 amd64 2.8.3 [985 kB]
Get:2 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 apt amd64 2.8.3 [1376 kB]
Get:3 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 apt-utils amd64 2.8.3 [216 kB]
Get:4 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 apt-transport-https all 2.8.3 [3970 B]
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:
Fetched 2580 kB in 3s (868 kB/s)
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 90444 files and directories currently installed.)
Preparing to unpack .../libapt-pkg6.0t64_2.8.3_amd64.deb ...
Unpacking libapt-pkg6.0t64:amd64 (2.8.3) over (2.7.14build2) ...
Setting up libapt-pkg6.0t64:amd64 (2.8.3) ...
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 90444 files and directories currently installed.)
Preparing to unpack .../archives/apt_2.8.3_amd64.deb ...
Unpacking apt (2.8.3) over (2.7.14build2) ...
Setting up apt (2.8.3) ...
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 90444 files and directories currently installed.)
Preparing to unpack .../00-apt-utils_2.8.3_amd64.deb ...
Unpacking apt-utils (2.8.3) over (2.7.14build2) ...
Preparing to unpack .../01-gpg-wks-client_2.4.4-2ubuntu17.3_amd64.deb ...
Unpacking gpg-wks-client (2.4.4-2ubuntu17.3) over (2.4.4-2ubuntu17) ...
Preparing to unpack .../02-dirmngr_2.4.4-2ubuntu17.3_amd64.deb ...
Unpacking dirmngr (2.4.4-2ubuntu17.3) over (2.4.4-2ubuntu17) ...
Preparing to unpack .../03-gnupg-utils_2.4.4-2ubuntu17.3_amd64.deb ...
Unpacking gnupg-utils (2.4.4-2ubuntu17.3) over (2.4.4-2ubuntu17) ...
Preparing to unpack .../04-gpgsm_2.4.4-2ubuntu17.3_amd64.deb ...
Unpacking gpgsm (2.4.4-2ubuntu17.3) over (2.4.4-2ubuntu17) ...
Preparing to unpack .../05-gpg-agent_2.4.4-2ubuntu17.3_amd64.deb ...
Unpacking gpg-agent (2.4.4-2ubuntu17.3) over (2.4.4-2ubuntu17) ...
Preparing to unpack .../06-gpg_2.4.4-2ubuntu17.3_amd64.deb ...
Unpacking gpg (2.4.4-2ubuntu17.3) over (2.4.4-2ubuntu17) ...
Preparing to unpack .../07-gpgconf_2.4.4-2ubuntu17.3_amd64.deb ...
Unpacking gpgconf (2.4.4-2ubuntu17.3) over (2.4.4-2ubuntu17) ...
Preparing to unpack .../08-gnupg_2.4.4-2ubuntu17.3_all.deb ...
Unpacking gnupg (2.4.4-2ubuntu17.3) over (2.4.4-2ubuntu17) ...
Preparing to unpack .../09-keyboxd_2.4.4-2ubuntu17.3_amd64.deb ...
Unpacking keyboxd (2.4.4-2ubuntu17.3) over (2.4.4-2ubuntu17) ...
Preparing to unpack .../10-gpgv_2.4.4-2ubuntu17.3_amd64.deb ...
Unpacking gpgv (2.4.4-2ubuntu17.3) over (2.4.4-2ubuntu17) ...
Setting up gpgv (2.4.4-2ubuntu17.3) ...
Selecting previously unselected package apt-transport-https.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 90444 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_2.8.3_all.deb ...
Unpacking apt-transport-https (2.8.3) ...
Preparing to unpack .../gnupg-l10n_2.4.4-2ubuntu17.3_all.deb ...
Unpacking gnupg-l10n (2.4.4-2ubuntu17.3) over (2.4.4-2ubuntu17) ...
Setting up apt-utils (2.8.3) ...
Setting up apt-transport-https (2.8.3) ...
Setting up gnupg-l10n (2.4.4-2ubuntu17.3) ...
Setting up gpgconf (2.4.4-2ubuntu17.3) ...
Setting up gpg (2.4.4-2ubuntu17.3) ...
Setting up gnupg-utils (2.4.4-2ubuntu17.3) ...
Setting up gpg-agent (2.4.4-2ubuntu17.3) ...
Setting up gpgsm (2.4.4-2ubuntu17.3) ...
Setting up dirmngr (2.4.4-2ubuntu17.3) ...
Setting up keyboxd (2.4.4-2ubuntu17.3) ...
Setting up gnupg (2.4.4-2ubuntu17.3) ...
Setting up gpg-wks-client (2.4.4-2ubuntu17.3) ...
Processing triggers for man-db (2.12.0-4build2) ...
Processing triggers for install-info (7.1-3build2) ...
Processing triggers for libc-bin (2.39-0ubuntu8.3) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
Running kernel seems to be up-to-date.
Restarting services...
systemctl restart packagekit.service
Service restarts being deferred:
systemctl restart unattended-upgrades.service
No containers need to be restarted.
User sessions running outdated binaries:
root @ session #8: apt[5793], bash[5526]
No VM guests are running outdated hypervisor (qemu) binaries on this host.
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Hit:1 http://archive.ubuntu.com/ubuntu noble InRelease
Hit:2 http://security.ubuntu.com/ubuntu noble-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu noble-updates InRelease
Get:4 https://deb.nodesource.com/node_20.x nodistro InRelease [12.1 kB]
Hit:5 http://archive.ubuntu.com/ubuntu noble-backports InRelease
Get:6 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages [13.2 kB]
Fetched 25.3 kB in 2s (13.2 kB/s)
Reading package lists...
Building dependency tree...
Reading state information...
211 packages can be upgraded. Run 'apt list --upgradable' to see them.
2025-12-27 03:02:03 - Repository configured successfully.
2025-12-27 03:02:03 - To install Node.js, run: apt install nodejs -y
2025-12-27 03:02:03 - You can use N|solid Runtime as a node.js alternative
2025-12-27 03:02:03 - To install N|solid Runtime, run: apt install nsolid -y

Selecting previously unselected package nodejs.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 90448 files and directories currently installed.)
Preparing to unpack .../nodejs_20.19.6-1nodesource1_amd64.deb ...
Unpacking nodejs (20.19.6-1nodesource1) ...
Setting up nodejs (20.19.6-1nodesource1) ...
Processing triggers for man-db (2.12.0-4build2) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
Running kernel seems to be up-to-date.
Restarting services...
Service restarts being deferred:
systemctl restart unattended-upgrades.service
No containers need to be restarted.
No user sessions are running outdated binaries.
No VM guests are running outdated hypervisor (qemu) binaries on this host.
added 133 packages in 26s
13 packages are looking for funding
run `npm fund` for details
npm notice
npm notice New major version of npm available! 10.8.2 -> 11.7.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.7.0
npm notice To update run: npm install -g npm@11.7.0
npm notice
added 1 package in 4s
1 package is looking for funding
run `npm fund` for details
✅ 环境初始化完成
🗄️ 步骤 6/9: 在新服务器上创建数据库...
Pseudo-terminal will not be allocated because stdin is not a terminal.
Welcome to Ubuntu 24.04.1 LTS (GNU/Linux 6.8.0-48-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/pro
System information as of Sat Dec 27 03:03:07 UTC 2025
System load: 0.25
Usage of /: 1.5% of 309.95GB
Memory usage: 2%
Swap usage: 0%
Processes: 404
Users logged in: 0
IPv4 address for ens17: 114.66.30.73
IPv6 address for ens17: 240e:f7:a020:203::d:2b2
IPv6 address for ens17: 240e:f7:a020:203::d:2b1
IPv6 address for ens17: 240e:f7:a020:203::d:2b0
IPv6 address for ens17: 240e:f7:a020:203::d:2af
IPv6 address for ens17: 240e:f7:a020:203::d:2ae
* Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s
just raised the bar for easy, resilient and secure K8s cluster deployment.
https://ubuntu.com/engage/secure-kubernetes-at-the-edge
Expanded Security Maintenance for Applications is not enabled.
218 updates can be applied immediately.
107 of these updates are standard security updates.
To see these additional updates run: apt list --upgradable
Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status
New release '25.04' available.
Run 'do-release-upgrade' to upgrade to it.
Synchronizing state of postgresql.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable postgresql
CREATE DATABASE
✅ 数据库创建完成
invalid command \$
ERROR: syntax error at or near "BEGIN"
LINE 2: BEGIN
^
ERROR: syntax error at or near "IF"
LINE 1: END IF;
^
invalid command \$
ERROR: syntax error at or near "GRANT"
LINE 3: GRANT ALL PRIVILEGES ON DATABASE ai_chatbot TO chatbot_user;
^
ERROR: role "chatbot_user" does not exist
📤 步骤 7/9: 上传文件到新服务器...
Pseudo-terminal will not be allocated because stdin is not a terminal.
Welcome to Ubuntu 24.04.1 LTS (GNU/Linux 6.8.0-48-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/pro
System information as of Sat Dec 27 03:05:39 UTC 2025
System load: 0.16
Usage of /: 1.7% of 309.95GB
Memory usage: 1%
Swap usage: 0%
Processes: 405
Users logged in: 0
IPv4 address for ens17: 114.66.30.73
IPv6 address for ens17: 240e:f7:a020:203::d:2b2
IPv6 address for ens17: 240e:f7:a020:203::d:2b1
IPv6 address for ens17: 240e:f7:a020:203::d:2b0
IPv6 address for ens17: 240e:f7:a020:203::d:2af
IPv6 address for ens17: 240e:f7:a020:203::d:2ae
* Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s
just raised the bar for easy, resilient and secure K8s cluster deployment.
https://ubuntu.com/engage/secure-kubernetes-at-the-edge
Expanded Security Maintenance for Applications is not enabled.
218 updates can be applied immediately.
107 of these updates are standard security updates.
To see these additional updates run: apt list --upgradable
Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status
New release '25.04' available.
Run 'do-release-upgrade' to upgrade to it.
✅ 项目文件已解压
⚙️ 步骤 8/9: 在新服务器上配置和恢复...
Pseudo-terminal will not be allocated because stdin is not a terminal.
Welcome to Ubuntu 24.04.1 LTS (GNU/Linux 6.8.0-48-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/pro
System information as of Sat Dec 27 03:05:39 UTC 2025
System load: 0.16
Usage of /: 1.7% of 309.95GB
Memory usage: 1%
Swap usage: 0%
Processes: 405
Users logged in: 0
IPv4 address for ens17: 114.66.30.73
IPv6 address for ens17: 240e:f7:a020:203::d:2b2
IPv6 address for ens17: 240e:f7:a020:203::d:2b1
IPv6 address for ens17: 240e:f7:a020:203::d:2b0
IPv6 address for ens17: 240e:f7:a020:203::d:2af
IPv6 address for ens17: 240e:f7:a020:203::d:2ae
* Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s
just raised the bar for easy, resilient and secure K8s cluster deployment.
https://ubuntu.com/engage/secure-kubernetes-at-the-edge
Expanded Security Maintenance for Applications is not enabled.
218 updates can be applied immediately.
107 of these updates are standard security updates.
To see these additional updates run: apt list --upgradable
Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status
New release '25.04' available.
Run 'do-release-upgrade' to upgrade to it.
正在导入数据库...
pg_restore: error: connection to server at "localhost" (127.0.0.1), port 5432 failed: FATAL: password authentication failed for user "chatbot_user"
connection to server at "localhost" (127.0.0.1), port 5432 failed: FATAL: password authentication failed for user "chatbot_user"
✅ 数据库导入完成(已忽略重复项)
正在安装依赖...
Lockfile is up to date, resolution step is skipped
Progress: resolved 1, reused 0, downloaded 0, added 0
Packages: +812
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 812, reused 0, downloaded 0, added 0
Progress: resolved 812, reused 0, downloaded 54, added 54
Progress: resolved 812, reused 0, downloaded 76, added 76
Progress: resolved 812, reused 0, downloaded 151, added 151
Progress: resolved 812, reused 0, downloaded 187, added 187
Progress: resolved 812, reused 0, downloaded 193, added 193
Progress: resolved 812, reused 0, downloaded 225, added 225
Progress: resolved 812, reused 0, downloaded 243, added 243
Progress: resolved 812, reused 0, downloaded 248, added 248
Progress: resolved 812, reused 0, downloaded 263, added 263
Progress: resolved 812, reused 0, downloaded 271, added 271
Progress: resolved 812, reused 0, downloaded 272, added 271
Progress: resolved 812, reused 0, downloaded 275, added 275
Progress: resolved 812, reused 0, downloaded 279, added 279
Progress: resolved 812, reused 0, downloaded 284, added 284
Progress: resolved 812, reused 0, downloaded 293, added 292
Progress: resolved 812, reused 0, downloaded 299, added 299
Progress: resolved 812, reused 0, downloaded 338, added 338
Progress: resolved 812, reused 0, downloaded 359, added 359
Progress: resolved 812, reused 0, downloaded 384, added 384
Progress: resolved 812, reused 0, downloaded 409, added 409
Progress: resolved 812, reused 0, downloaded 414, added 414
Progress: resolved 812, reused 0, downloaded 424, added 424
Progress: resolved 812, reused 0, downloaded 429, added 429
Progress: resolved 812, reused 0, downloaded 440, added 440
Progress: resolved 812, reused 0, downloaded 444, added 444
Progress: resolved 812, reused 0, downloaded 452, added 452
Progress: resolved 812, reused 0, downloaded 477, added 477
Progress: resolved 812, reused 0, downloaded 508, added 508
Progress: resolved 812, reused 0, downloaded 534, added 534
Progress: resolved 812, reused 0, downloaded 542, added 542
Progress: resolved 812, reused 0, downloaded 605, added 605
Progress: resolved 812, reused 0, downloaded 619, added 619
Progress: resolved 812, reused 0, downloaded 656, added 656
Progress: resolved 812, reused 0, downloaded 664, added 664
Progress: resolved 812, reused 0, downloaded 668, added 668
Progress: resolved 812, reused 0, downloaded 670, added 670
Progress: resolved 812, reused 0, downloaded 678, added 678
Progress: resolved 812, reused 0, downloaded 686, added 686
Progress: resolved 812, reused 0, downloaded 690, added 690
Progress: resolved 812, reused 0, downloaded 698, added 698
Progress: resolved 812, reused 0, downloaded 703, added 703
Progress: resolved 812, reused 0, downloaded 705, added 705
 WARN  GET https://registry.npmmirror.com/bail/-/bail-2.0.2.tgz error (ETIMEDOUT). Will retry in 10 seconds. 2 retries left.
Progress: resolved 812, reused 0, downloaded 712, added 712
Progress: resolved 812, reused 0, downloaded 719, added 719
Progress: resolved 812, reused 0, downloaded 721, added 721
Progress: resolved 812, reused 0, downloaded 736, added 736
Progress: resolved 812, reused 0, downloaded 756, added 756
Progress: resolved 812, reused 0, downloaded 786, added 785
Progress: resolved 812, reused 0, downloaded 787, added 787
Progress: resolved 812, reused 0, downloaded 789, added 789
Progress: resolved 812, reused 0, downloaded 790, added 789
Progress: resolved 812, reused 0, downloaded 791, added 790
Progress: resolved 812, reused 0, downloaded 791, added 791
Progress: resolved 812, reused 0, downloaded 794, added 794
Progress: resolved 812, reused 0, downloaded 795, added 794
Progress: resolved 812, reused 0, downloaded 797, added 796
Progress: resolved 812, reused 0, downloaded 798, added 798
Progress: resolved 812, reused 0, downloaded 799, added 798
Progress: resolved 812, reused 0, downloaded 799, added 799
Progress: resolved 812, reused 0, downloaded 800, added 799
Progress: resolved 812, reused 0, downloaded 800, added 800
Progress: resolved 812, reused 0, downloaded 801, added 800
Progress: resolved 812, reused 0, downloaded 801, added 801
Progress: resolved 812, reused 0, downloaded 802, added 801
Progress: resolved 812, reused 0, downloaded 802, added 802
Progress: resolved 812, reused 0, downloaded 803, added 802
Progress: resolved 812, reused 0, downloaded 803, added 803
Progress: resolved 812, reused 0, downloaded 805, added 805
Progress: resolved 812, reused 0, downloaded 806, added 805
Progress: resolved 812, reused 0, downloaded 806, added 806
Progress: resolved 812, reused 0, downloaded 807, added 806
Progress: resolved 812, reused 0, downloaded 807, added 807
Progress: resolved 812, reused 0, downloaded 808, added 807
Progress: resolved 812, reused 0, downloaded 808, added 808
Progress: resolved 812, reused 0, downloaded 809, added 808
Progress: resolved 812, reused 0, downloaded 809, added 809
Progress: resolved 812, reused 0, downloaded 810, added 809
Progress: resolved 812, reused 0, downloaded 810, added 810
Progress: resolved 812, reused 0, downloaded 811, added 810
Progress: resolved 812, reused 0, downloaded 811, added 811
Progress: resolved 812, reused 0, downloaded 812, added 811
Progress: resolved 812, reused 0, downloaded 812, added 812, done
.../esbuild@0.25.1/node_modules/esbuild postinstall$ node install.js
.../esbuild@0.18.20/node_modules/esbuild postinstall$ node install.js
.../node_modules/protobufjs postinstall$ node scripts/postinstall
.../esbuild@0.19.12/node_modules/esbuild postinstall$ node install.js
.../sharp@0.34.5/node_modules/sharp install$ node install/check.js || npm run build
.../esbuild@0.25.1/node_modules/esbuild postinstall: Done
.../esbuild@0.18.20/node_modules/esbuild postinstall: Done
.../node_modules/protobufjs postinstall: Done
.../esbuild@0.19.12/node_modules/esbuild postinstall: Done
.../node_modules/bufferutil install$ node-gyp-build
.../sharp@0.34.5/node_modules/sharp install: Done
.../node_modules/bufferutil install: Done
dependencies:
+ @ai-sdk/gateway 1.0.41
+ @ai-sdk/openai 2.0.13
+ @ai-sdk/provider 2.0.0
+ @ai-sdk/react 2.0.26
+ @ai-sdk/xai 2.0.13
+ @aws-sdk/client-s3 3.943.0
+ @codemirror/lang-javascript 6.2.3
+ @codemirror/lang-python 6.1.7
+ @codemirror/state 6.5.2
+ @codemirror/theme-one-dark 6.1.2
+ @codemirror/view 6.36.4
+ @icons-pack/react-simple-icons 13.8.0
+ @opentelemetry/api 1.9.0
+ @opentelemetry/api-logs 0.200.0
+ @radix-ui/react-dialog 1.1.15
+ @radix-ui/react-icons 1.3.2
+ @radix-ui/react-select 2.2.6
+ @radix-ui/react-switch 1.2.6
+ @radix-ui/react-tabs 1.1.13
+ @radix-ui/react-use-controllable-state 1.2.2
+ @radix-ui/react-visually-hidden 1.1.2
+ @vercel/analytics 1.5.0
+ @vercel/blob 0.24.1
+ @vercel/functions 2.2.13
+ @vercel/otel 1.14.0
+ @xenova/transformers 2.17.2
+ ai 5.0.26
+ bcrypt-ts 5.0.3
+ class-variance-authority 0.7.1
+ classnames 2.5.1
+ clsx 2.1.1
+ codemirror 6.0.1
+ date-fns 4.1.0
+ diff-match-patch 1.0.5
+ dotenv 16.4.7
+ drizzle-orm 0.34.1
+ embla-carousel-react 8.6.0
+ fast-deep-equal 3.1.3
+ framer-motion 11.18.2
+ geist 1.3.1
+ katex 0.16.25
+ lucide-react 0.446.0
+ nanoid 5.1.3
+ next 16.0.5
+ next-auth 5.0.0-beta.25
+ next-themes 0.3.0
+ orderedmap 2.1.1
+ papaparse 5.5.2
+ postgres 3.4.5
+ prosemirror-example-setup 1.2.3
+ prosemirror-inputrules 1.4.0
+ prosemirror-markdown 1.13.1
+ prosemirror-model 1.24.1
+ prosemirror-schema-basic 1.2.3
+ prosemirror-schema-list 1.5.1
+ prosemirror-state 1.4.3
+ prosemirror-view 1.38.1
+ radix-ui 1.4.3
+ react 19.0.0-rc-45804af1-20241021
+ react-data-grid 7.0.0-beta.47
+ react-dom 19.0.0-rc-45804af1-20241021
+ react-resizable-panels 2.1.7
+ react-syntax-highlighter 15.6.6
+ redis 5.9.0
+ resumable-stream 2.2.8
+ server-only 0.0.1
+ sharp 0.34.5
+ shiki 3.14.0
+ sonner 1.7.4
+ streamdown 1.4.0
+ swr 2.3.3
+ tailwind-merge 2.6.0
+ tailwindcss-animate 1.0.7
+ tokenlens 1.3.0
+ use-stick-to-bottom 1.1.1
+ usehooks-ts 3.1.1
+ zod 3.25.76
devDependencies:
+ @biomejs/biome 2.2.2
+ @playwright/test 1.51.0
+ @tailwindcss/postcss 4.1.16
+ @tailwindcss/typography 0.5.16
+ @types/d3-scale 4.0.9
+ @types/node 22.13.10
+ @types/papaparse 5.3.15
+ @types/pdf-parse 1.1.4
+ @types/react 18.3.18
+ @types/react-dom 18.3.5
+ @types/react-syntax-highlighter 15.5.13
+ @types/sharp 0.32.0
+ drizzle-kit 0.25.0
+ postcss 8.5.3
+ tailwindcss 4.1.16
+ tsx 4.19.3
+ typescript 5.8.2
+ ultracite 5.3.9
Done in 3m 47.8s
✅ 依赖安装完成
正在运行数据库迁移...
> ai-chatbot@3.1.0 db:migrate /var/www/ai-chatbot
> npx tsx lib/db/migrate.ts
⏳ Running migrations...
❌ Migration failed
PostgresError: password authentication failed for user "chatbot_user"
at ErrorResponse (/var/www/ai-chatbot/node_modules/.pnpm/postgres@3.4.5/node_modules/postgres/cjs/src/connection.js:788:26)
at handle (/var/www/ai-chatbot/node_modules/.pnpm/postgres@3.4.5/node_modules/postgres/cjs/src/connection.js:474:6)
at Socket.data (/var/www/ai-chatbot/node_modules/.pnpm/postgres@3.4.5/node_modules/postgres/cjs/src/connection.js:315:9)
at Socket.emit (node:events:524:28)
at addChunk (node:internal/streams/readable:561:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
at Readable.push (node:internal/streams/readable:392:5)
at TCP.onStreamRead (node:internal/stream_base_commons:191:23) {
severity_local: 'FATAL',
severity: 'FATAL',
code: '28P01',
file: 'auth.c',
line: '331',
routine: 'auth_failed'
}
 ELIFECYCLE  Command failed with exit code 1.
⚠️ 数据库迁移跳过或失败
✅ 数据库迁移完成
正在构建项目...
> ai-chatbot@3.1.0 build /var/www/ai-chatbot
> tsx lib/db/migrate && next build
⏳ Running migrations...
❌ Migration failed
PostgresError: password authentication failed for user "chatbot_user"
at ErrorResponse (/var/www/ai-chatbot/node_modules/.pnpm/postgres@3.4.5/node_modules/postgres/cjs/src/connection.js:788:26)
at handle (/var/www/ai-chatbot/node_modules/.pnpm/postgres@3.4.5/node_modules/postgres/cjs/src/connection.js:474:6)
at Socket.data (/var/www/ai-chatbot/node_modules/.pnpm/postgres@3.4.5/node_modules/postgres/cjs/src/connection.js:315:9)
at Socket.emit (node:events:524:28)
at addChunk (node:internal/streams/readable:561:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
at Readable.push (node:internal/streams/readable:392:5)
at TCP.onStreamRead (node:internal/stream_base_commons:191:23) {
severity_local: 'FATAL',
severity: 'FATAL',
code: '28P01',
file: 'auth.c',
line: '331',
routine: 'auth_failed'
}
 ELIFECYCLE  Command failed with exit code 1.
✅ 项目构建完成
正在配置 PM2...
-------------
__/\\\\\\\\\\\\\____/\\\\____________/\\\\____/\\\\\\\\\_____
_\/\\\/////////\\\_\/\\\\\\________/\\\\\\__/\\\///////\\\___
_\/\\\_______\/\\\_\/\\\//\\\____/\\\//\\\_\///______\//\\\__
_\/\\\\\\\\\\\\\/__\/\\\\///\\\/\\\/_\/\\\___________/\\\/___
_\/\\\/////////____\/\\\__\///\\\/___\/\\\________/\\\//_____
_\/\\\_____________\/\\\____\///_____\/\\\_____/\\\//________
_\/\\\_____________\/\\\_____________\/\\\___/\\\/___________
_\/\\\_____________\/\\\_____________\/\\\__/\\\\\\\\\\\\\\\_
_\///______________\///______________\///__\///////////////__
Runtime Edition
PM2 is a Production Process Manager for Node.js applications
with a built-in Load Balancer.
Start and Daemonize any application:
$ pm2 start app.js
Load Balance 4 instances of api.js:
$ pm2 start api.js -i 4
Monitor in production:
$ pm2 monitor
Make pm2 auto-boot at server restart:
$ pm2 startup
To go further checkout:
http://pm2.io/
-------------
[PM2] Spawning PM2 daemon with pm2_home=/root/.pm2
[PM2] PM2 Successfully daemonized
[PM2][WARN] Applications ai-chatbot not running, starting...
[PM2] Creating folder: /var/log/pm2
[PM2][WARN] Folder does not exist: /var/log/pm2
[PM2] App [ai-chatbot] launched (1 instances)
┌────┬───────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├────┼───────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ ai-chatbot │ default │ 16.0.5 │ fork │ 7706 │ 0s │ 0 │ online │ 0% │ 30.0mb │ root │ disabled │
└────┴───────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
[PM2] Saving current process list...
[PM2] Successfully saved in /root/.pm2/dump.pm2
[PM2] Init System found: systemd
Platform systemd
Template
[Unit]
Description=PM2 process manager
Documentation=https://pm2.keymetrics.io/
After=network.target
[Service]
Type=forking
User=root
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
Environment=PM2_HOME=/root/.pm2
PIDFile=/root/.pm2/pm2.pid
Restart=on-failure
ExecStart=/usr/lib/node_modules/pm2/bin/pm2 resurrect
ExecReload=/usr/lib/node_modules/pm2/bin/pm2 reload all
ExecStop=/usr/lib/node_modules/pm2/bin/pm2 kill
[Install]
WantedBy=multi-user.target
Target path
/etc/systemd/system/pm2-root.service
Command list
[ 'systemctl enable pm2-root' ]
[PM2] Writing init configuration in /etc/systemd/system/pm2-root.service
[PM2] Making script booting at startup...
[PM2] [-] Executing: systemctl enable pm2-root...
Created symlink /etc/systemd/system/multi-user.target.wants/pm2-root.service → /etc/systemd/system/pm2-root.service.
[PM2] [v] Command successfully executed.
+---------------------------------------+
[PM2] Freeze a process list on reboot via:
$ pm2 save
[PM2] Remove init script via:
$ pm2 unstartup systemd
✅ PM2 配置完成
正在配置 Nginx...
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
✅ Nginx 配置完成
✅ 临时文件已清理
==========================================
✅ 迁移完成!
==========================================
新服务器地址: http://114.66.30.73
请检查以下内容:
1. 检查 .env.local 文件中的配置(特别是数据库密码)
2. 检查 PM2 状态: pm2 status
3. 检查日志: pm2 logs ai-chatbot
4. 访问网站验证功能
==========================================
✅ 步骤 9/9: 清理临时文件...
✅ 临时文件已清理
🎉 迁移脚本执行完成!
📝 后续步骤:
1. 连接到新服务器: ssh -p 22 root@114.66.30.73
2. 检查数据库密码: cd /var/www/ai-chatbot && cat .env.local
3. 如果需要,更新数据库密码并更新 .env.local
4. 检查服务状态: pm2 status && pm2 logs
5. 访问网站: http://114.66.30.73
⚠️ 重要提示:
- 请更新数据库密码(.env.local 中的 POSTGRES_URL)
- 如果使用域名,请更新 AUTH_URL
- 检查所有环境变量是否正确配置