恢复快照出错,直接 docker 就没有1panel镜像

新装的ubuntu20.02系统,安装最新的1panel,然后去恢复 全系统快照出错,直接 docker 里就没有1panel镜像了。

看能 指定安装1panel的老版本不,或者能不能以后提供在 ssh里 直接使用命令运行恢复程序,恢复快照

多次使用 新安装的系统,执行上述 恢复快照功能,均是那个问题!

1Panel 自身也不是通过 docker 容器化安装的。

具体问题是啥?贴一下错误日志、截图。

1 个赞

直接 docker 里,就没有1panel安装的其它镜像了,也没有地方显示错误日志。

操作多次都是这样

1panel直接就不在了,在线面板进不去了,docker里也没有镜像了。然后不是看/opt 里有1panel生成的目录,你还以为你没有安装过 1panel。

我老版本1panel,恢复快照功能是正常的。

最新版本的快照功能,不再备份整个 docker 数据目录(只会备份应用商店中已安装应用的镜像)

应用商店安装了openresty,然后新建了几个网站,最后生成快照。 在另一个新安装系统的服务器,安装1panel,安装openresty,然后恢复快照,最后 面板进不去,docker里也没有了openresty

你不信的话,可以试一下。

好的,在本地环境复现一下。

可以提供一下系统日志吗
cat /opt/1panel/log/1Panel.log

[2023-08-22 09:39:49] [DEBUG] tar --warning=no-file-changed -zcf /opt/1panel_original/original_1panel_v1.5.2_20230821083723/1panel_backup.tar.gz --exclude ./system -C /opt/1panel/backup .
[2023-08-22 09:39:49] [DEBUG] tar -zxf /opt/1panel/tmp/system/1panel_v1.5.2_20230821083723/1panel_v1.5.2_20230821083723/1panel/1panel_backup.tar.gz -C /opt/1panel/backup .
[2023-08-22 09:39:49] [INFO] handle backup data successful!
[2023-08-22 09:39:49] [DEBUG] tar --warning=no-file-changed -zcf /opt/1panel_original/original_1panel_v1.5.2_20230821083723/1panel_data.tar.gz --exclude ./tmp --exclude ./log --exclude ./cache --exclude ./db/1Panel.db-* --exclude ./backup -C /opt/1panel .
[2023-08-22 09:39:49] [DEBUG] tar -zxf /opt/1panel/tmp/system/1panel_v1.5.2_20230821083723/1panel_v1.5.2_20230821083723/1panel/1panel_data.tar.gz -C /opt/1panel .
[2023-08-22 09:39:54] [INFO] recover successful
2023/08/22 09:39:54 8455 Received SIGTERM.
2023/08/22 09:39:54 8455 Waiting for connections to finish…
2023/08/22 09:39:54 8455 Serve() returning…
[2023-08-22 09:39:54] [ERROR] accept tcp [::]:18888: use of closed network connection
panic: accept tcp [::]:18888: use of closed network connection

goroutine 1 [running]:
github.com/1Panel-dev/1Panel/backend/server.Start()
github.com/1Panel-dev/1Panel/backend/server/server.go:59 +0x638
github.com/1Panel-dev/1Panel/cmd/server/cmd.glob..func7(0x654df60?, {0x1ee8d92?, 0x0?, 0x0?})
github.com/1Panel-dev/1Panel/cmd/server/cmd/root.go:21 +0x1c
github.com/spf13/cobra.(*Command).execute(0x654df60, {0x400010c200, 0x0, 0x0})
github.com/spf13/cobra@v1.6.1/command.go:916 +0x5c4
github.com/spf13/cobra.(*Command).ExecuteC(0x654df60)
github.com/spf13/cobra@v1.6.1/command.go:1044 +0x340
github.com/spf13/cobra.(*Command).Execute(0x400006a768?)
github.com/spf13/cobra@v1.6.1/command.go:968 +0x1c
main.main()
./main.go:23 +0x24
[2023-08-22 09:39:54] [INFO] init logger successfully
[2023-08-22 09:39:54] [INFO] init db successfully
[2023-08-22 09:39:54] [ERROR] database disk image is malformed (11)
panic: database disk image is malformed (11)

goroutine 1 [running]:
github.com/1Panel-dev/1Panel/backend/init/migration.Init()
github.com/1Panel-dev/1Panel/backend/init/migration/migrate.go:44 +0x5a8
github.com/1Panel-dev/1Panel/backend/server.Start()
github.com/1Panel-dev/1Panel/backend/server/server.go:38 +0x34
github.com/1Panel-dev/1Panel/cmd/server/cmd.glob..func7(0x654df80?, {0x1ee8d12?, 0x0?, 0x0?})
github.com/1Panel-dev/1Panel/cmd/server/cmd/root.go:21 +0x1c
github.com/spf13/cobra.(*Command).execute(0x654df80, {0x400010c200, 0x0, 0x0})
github.com/spf13/cobra@v1.6.1/command.go:916 +0x5c4
github.com/spf13/cobra.(*Command).ExecuteC(0x654df80)
github.com/spf13/cobra@v1.6.1/command.go:1044 +0x340
github.com/spf13/cobra.(*Command).Execute(0x400006a768?)
github.com/spf13/cobra@v1.6.1/command.go:968 +0x1c
main.main()
./main.go:23 +0x24
[2023-08-22 09:39:59] [INFO] init logger successfully
[2023-08-22 09:39:59] [INFO] init db successfully
[2023-08-22 09:39:59] [ERROR] database disk image is malformed (11)
panic: database disk image is malformed (11)

root@ubuntu:~# 1pctl status
● 1panel.service - 1Panel, a modern open source linux panel
Loaded: loaded (/etc/systemd/system/1panel.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Tue 2023-08-22 09:50:34 > Process: 15144 ExecStart=/usr/bin/1panel (code=exited, status=2)
Main PID: 15144 (code=exited, status=2)

Aug 22 09:50:34 ubuntu systemd[1]: 1panel.service: Main process exited, code=exited, stat>Aug 22 09:50:34 ubuntu systemd[1]: 1panel.service: Failed with result ‘exit-code’.
lines 1-8/8 (END)

我把系统升级到今天最新版本

然后重新生成快照,重新恢复快照试了一下,安装的 openresty这次没有消失,面板还是进不去

其它日志如下。

[2023-08-22 10:25:41] [INFO] recover successful
2023/08/22 10:25:41 18793 Received SIGTERM.
2023/08/22 10:25:41 18793 Waiting for connections to finish…
2023/08/22 10:25:41 18793 [::]:18888 Listener closed.
2023/08/22 10:25:57 18793 Serve() returning…
[2023-08-22 10:25:57] [ERROR] accept tcp [::]:18888: use of closed network connection
panic: accept tcp [::]:18888: use of closed network connection

goroutine 1 [running]:
github.com/1Panel-dev/1Panel/backend/server.Start()
github.com/1Panel-dev/1Panel/backend/server/server.go:59 +0x638
github.com/1Panel-dev/1Panel/cmd/server/cmd.glob..func7(0x654df60?, {0x1ee8d92?, 0x0?, 0x0?})
github.com/1Panel-dev/1Panel/cmd/server/cmd/root.go:21 +0x1c
github.com/spf13/cobra.(*Command).execute(0x654df60, {0x400004c250, 0x0, 0x0})
github.com/spf13/cobra@v1.6.1/command.go:916 +0x5c4
github.com/spf13/cobra.(*Command).ExecuteC(0x654df60)
github.com/spf13/cobra@v1.6.1/command.go:1044 +0x340
github.com/spf13/cobra.(*Command).Execute(0x400006a768?)
github.com/spf13/cobra@v1.6.1/command.go:968 +0x1c
main.main()
./main.go:23 +0x24
[2023-08-22 10:25:57] [INFO] init logger successfully
[2023-08-22 10:25:57] [INFO] init db successfully
[2023-08-22 10:25:57] [ERROR] database disk image is malformed (11)
panic: database disk image is malformed (11)

goroutine 1 [running]:
github.com/1Panel-dev/1Panel/backend/init/migration.Init()
github.com/1Panel-dev/1Panel/backend/init/migration/migrate.go:44 +0x5a8
github.com/1Panel-dev/1Panel/backend/server.Start()
github.com/1Panel-dev/1Panel/backend/server/server.go:38 +0x34
github.com/1Panel-dev/1Panel/cmd/server/cmd.glob..func7(0x654df60?, {0x1ee8d92?, 0x0?, 0x0?})
github.com/1Panel-dev/1Panel/cmd/server/cmd/root.go:21 +0x1c
github.com/spf13/cobra.(*Command).execute(0x654df60, {0x400004c250, 0x0, 0x0})
github.com/spf13/cobra@v1.6.1/command.go:916 +0x5c4
github.com/spf13/cobra.(*Command).ExecuteC(0x654df60)
github.com/spf13/cobra@v1.6.1/command.go:1044 +0x340
github.com/spf13/cobra.(*Command).Execute(0x400006a768?)
github.com/spf13/cobra@v1.6.1/command.go:968 +0x1c
main.main()
./main.go:23 +0x24
[2023-08-22 10:26:03] [INFO] init logger successfully
[2023-08-22 10:26:03] [INFO] init db successfully
[2023-08-22 10:26:03] [ERROR] database disk image is malformed (11)
panic: database disk image is malformed (11)

goroutine 1 [running]:
github.com/1Panel-dev/1Panel/backend/init/migration.Init()
github.com/1Panel-dev/1Panel/backend/init/migration/migrate.go:44 +0x5a8
github.com/1Panel-dev/1Panel/backend/server.Start()
github.com/1Panel-dev/1Panel/backend/server/server.go:38 +0x34
github.com/1Panel-dev/1Panel/cmd/server/cmd.glob..func7(0x654df60?, {0x1ee8d92?, 0x0?, 0x0?})
github.com/1Panel-dev/1Panel/cmd/server/cmd/root.go:21 +0x1c
github.com/spf13/cobra.(*Command).execute(0x654df60, {0x400004c250, 0x0, 0x0})
github.com/spf13/cobra@v1.6.1/command.go:916 +0x5c4
github.com/spf13/cobra.(*Command).ExecuteC(0x654df60)
github.com/spf13/cobra@v1.6.1/command.go:1044 +0x340
github.com/spf13/cobra.(*Command).Execute(0x400006a768?)
github.com/spf13/cobra@v1.6.1/command.go:968 +0x1c
main.main()
./main.go:23 +0x24
[2023-08-22 10:26:08] [INFO] init logger successfully
[2023-08-22 10:26:08] [INFO] init db successfully
[2023-08-22 10:26:08] [ERROR] database disk image is malformed (11)
panic: database disk image is malformed (11)

这里是数据库文件不完整导致的启动失败

可以查看一下 /opt 下面是否有 original 文件 或者 1panel_original 文件,如果有的话解压,然后用 1panel_data 里面的数据库替换一下当前数据库,最后重启 1panel 就行了。

有添加社区群的话,可以在群里发一下消息,远程操作一下。

感谢,感谢。

群是多少,我加一下。这样反馈问题,确实太慢了。

官网底部就有群二维码

好的,谢谢!!!!!!

我也是同样的问题能不能帮忙解决一下

加我
image