dotfiles/bin/move-dockervol

4 lines
208 B
Plaintext
Raw Permalink Normal View History

docker run --rm \
-v <SOURCE_DATA_VOLUME_NAME>:/from \
alpine ash -c "cd /from ; tar -cf - . " | ssh <TARGET_HOST> 'docker run --rm -i -v <TARGET_DATA_VOLUME_NAME>:/to alpine ash -c "cd /to ; tar -xpvf - " '