迁移2.0后回滚失败。 #8999
迁移2.0后回滚失败。
#8999
Replies: 1 comment 4 replies
-
由于升级 Core 和 Agent 都会操作相同的数据库,可能导致数据异常了。 |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
我跟随教程里的步骤,在执行完:升级为主节点 1panel-migrator upgrade core 以后。由于分神,下一步执行了 升级为从节点1panel-migrator upgrade agent
在这之后,我发现了报错:
迁移期间将停止当前 V1 服务,请确认风险后再继续操作。
是否确认将 V1 迁移至 V2 从节点? (y/n): y
2025/06/10 18:25:19 初始化 core.db 完成
2025/06/10 18:25:22 [xpack] 初始化 core.db 完成
2025/06/10 18:25:36 初始化 agent.db 完成
2025/06/10 18:25:38 [xpack] 初始化 agent.db 完成
2025/06/10 18:25:38 基础数据初始化成功!
2025/06/10 18:28:41 数据迁移成功!
Error: mv file from /usr/local/bin/1panel to /opt/1panel-v1-backups failed, err: stderr: mv: cannot stat '/usr/local/bin/1panel': No such file or directory
Usage:
upgrade agent [flags]
Flags:
-h, --help help for agent
panic: mv file from /usr/local/bin/1panel to /opt/1panel-v1-backups failed, err: stderr: mv: cannot stat '/usr/local/bin/1panel': No such file or directory
goroutine 1 [running]:
main.main()
./main.go:9 +0x30
依然又执行了 第二步:升级网站1panel-migrator upgrade website
注意事项:
网站迁移前请务必阅读!
迁移期间网站将不可访问,请确认风险后继续操作。
是否确认迁移网站? (y/n): y
再次确认:确定要升级网站吗? (y/n): y
正在升级网站...
2025/06/10 18:29:16 应用商店状态正常
2025/06/10 18:29:16 V1 App install 没有 Openresty 跳过迁移
然后我再去登录1panel,这时候发现我用原来的用户名和密码无法登录,说我用户名密码不对。然后我决定回滚回V1再重新升级,这时候回滚就报错了。
注意事项:
请勿在未升级至 1Panel V2 版本前执行此命令
即将回滚当前 1Panel 服务到 V1 版本,是否继续 [y/n] : y
2025/06/10 18:30:44 V2 相关文件删除成功!
Error: copy file /opt/1panel-v1-backups/1panel to /usr/local/bin failed, err: stderr: cp: cannot stat '/opt/1panel-v1-backups/1panel': No such file or directory
Usage:
rollback service [flags]
Flags:
-h, --help help for service
panic: copy file /opt/1panel-v1-backups/1panel to /usr/local/bin failed, err: stderr: cp: cannot stat '/opt/1panel-v1-backups/1panel': No such file or directory
goroutine 1 [running]:
main.main()
./main.go:9 +0x30
我去查看了一下,的确没有/opt/1panel-v1-backups/1panel这个目录,现在我的1panel服务都还运行,但是面板登录页面已经无法打开了,1pctl命令也没有任何反应,我无法升级V2,也无法回滚V1,请问该怎么解决?
Beta Was this translation helpful? Give feedback.
All reactions