将仅数据的码头容器从一台机器移动到另一台机器的正确方法 [英] The right way to move a data-only docker container from one machine to another

查看:117
本文介绍了将仅数据的码头容器从一台机器移动到另一台机器的正确方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个数据库docker容器正在将数据写入另一个仅数据的容器。仅数据容器具有存储数据库数据的卷。是否有一个docker的方式将这个仅数据的容器从一台机器迁移到另一台机器?我看到关于码头保存和码头加载,但这些命令保存和加载图像,而不是容器。我想要能够将Docker容器及其卷一起打包,并将其移动到另一台机器。

I have a database docker container that is writing its data to another data-only container. The data-only container has a volume where it stores the data of the database. Is there a "docker" way of migrating this data-only container from one machine to another? I read about docker save and docker load but these commands save and load images, not containers. I want to be able to package the docker container along with its volumes and move it to another machine.

推荐答案

结帐 flocker 项目。使用ZFS快照并复制主机之间的存储卷,这个问题非常有趣的解决方案。

Checkout the flocker project. Very interesting solution to this problem, using ZFS to snapshot and replicate the storage volume between hosts.

这篇关于将仅数据的码头容器从一台机器移动到另一台机器的正确方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆