Skip to content

Latest commit

 

History

History
9 lines (5 loc) · 471 Bytes

Docker_Commands.md

File metadata and controls

9 lines (5 loc) · 471 Bytes

Docker Commands

Transfer docker data volume to another host

From one remote host to another remote host, connecting to them through SSH.

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

Source