Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道是否可以将整个容器转储到 tgz 存档中,以便可以将其备份或移动到另一台服务器。我知道我可以用图像来做到这一点,所以我可以将容器作为图像发布并转储它,但能够直接做到这一点会很好。
提前致谢!
是的,首先您可能需要发布将创建本地图像的容器,然后导出该图像,这将创建一个存档
例如我机器上的 lxc 列表
TestContainer | RUNNING
发布容器
lxc publish TestContainer --alias TestContainerPublish --force
并将图像导出到当前目录
lxc image export TestContainerPublish .
比你完成