Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move docker data volume containers between CoreOS hosts

For some scenarios a clustered file system is just too much. This is, if I got it right, the use case for the data volume container pattern. But even CoreOS needs updates from time to time. If I'd still like to minimise the down time of applications, I'd have to move the data volume container with the app container to an other host, while the old host is being updated.

Are there best practices existing? A solution mentioned more often is the "backup" of a container with docker export on the old host and docker import on the new host. But this would include scp-ing of tar-files to an other host. Can this be managed with fleet?

like image 339
brejoc Avatar asked Oct 21 '22 02:10

brejoc


1 Answers

@brejoc, I wouldn't call this a solution, but it may help:

Alternative 1: Use another OS, which does have clustering, or at least - doesn't prevent it. I am now experimenting with CentOS. 2: I've created a couple of tools that help in some use cases. First tool, retrieves data from S3 (usually artifacts), and is uni-directional. Second tool, which I call 'backup volume container', has a lot of potential in it, but requires some feedback. It provides a 2-way backup/restore for data, from/to many persistent data stores including S3 (but also Dropbox, which is cool). As it is implemented now, when you run it for the first time, it would restore to the container. From that point on, it would monitor the relevant folder in the container for changes, and upon changes (and after a quiet period), it would back up to the persistent store.

Backup volume container: https://registry.hub.docker.com/u/yaronr/backup-volume-container/ File sync from S3: https://registry.hub.docker.com/u/yaronr/awscli/ (docker run yaronr/awscli aws s3 etc etc - read aws docs)

like image 56
JRun Avatar answered Oct 24 '22 10:10

JRun