Long overdue first commit with content
This commit is contained in:
parent
f63ce5bdd8
commit
6cc9d8c72a
92 changed files with 2031 additions and 97 deletions
15
content/en/blog/docker/migrate-data-volume.md
Executable file
15
content/en/blog/docker/migrate-data-volume.md
Executable file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: "Migrate a data volume"
|
||||
linkTitle: "Migrate a data volume"
|
||||
date: 2018-01-30
|
||||
description: >
|
||||
How to migrate a data volume
|
||||
---
|
||||
|
||||
Here is how to migrate a data volume between two of your hosts. A rsync of the proper `/var/lib/docker/volumes` subfolder would work just as well, but is here a fun way to do it with docker and pipes :
|
||||
{{< highlight sh >}}
|
||||
export VOLUME=tiddlywiki
|
||||
export DEST=10.1.0.242
|
||||
docker run --rm -v $VOLUME:/from alpine ash -c "cd /from ; tar -cpf - . " \
|
||||
| ssh $DEST "docker run --rm -i -v $VOLUME:/to alpine ash -c 'cd /to ; tar -xfp - ' "
|
||||
{{< /highlight >}}
|
Loading…
Add table
Add a link
Reference in a new issue