Last active
December 2, 2021 10:40
-
-
Save kuhnroyal/1d02eea25d634798ac6768f15e503f84 to your computer and use it in GitHub Desktop.
Revisions
-
kuhnroyal revised this gist
Mar 18, 2017 . 1 changed file with 2 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,9 +2,7 @@ ssh USER@HOST 'docker run --rm -v VOLUME_NAME:/from alpine ash -c "cd /from ; tar -czf - . "' > FILENAME.tgz # backup remote docker volume to local volume ssh USER@HOST 'docker run --rm -v VOLUME_NAME:/from alpine ash -c "cd /from ; tar -czf - . "' | docker run --rm -i -v VOLUME_NAME:/to alpine ash -c "cd /to ; tar -xzvf - " # copy local docker volume to remote volume docker run --rm -v VOLUME_NAME:/from alpine ash -c "cd /from ; tar -czf - . " | ssh USER@HOST 'docker run --rm -i -v VOLUME_NAME:/to alpine ash -c "cd /to ; tar -xzvf - "' -
kuhnroyal revised this gist
Feb 10, 2017 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,2 +1,10 @@ # backup remote docker volume to local tar file ssh USER@HOST 'docker run --rm -v VOLUME_NAME:/from alpine ash -c "cd /from ; tar -czf - . "' > FILENAME.tgz # backup remote docker volume to local volume ssh USER@HOST 'docker run --rm -v VOLUME_NAME:/from alpine ash -c "cd /from ; tar -czf - . "' \ | docker run --rm -i -v VOLUME_NAME:/to alpine ash -c "cd /to ; tar -xzvf - " # copy local docker volume to remote volume docker run --rm -v VOLUME_NAME:/from alpine ash -c "cd /from ; tar -czf - . " \ | ssh USER@HOST 'docker run --rm -i -v VOLUME_NAME:/to alpine ash -c "cd /to ; tar -xzvf - "' -
kuhnroyal renamed this gist
Feb 10, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
kuhnroyal created this gist
Feb 10, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ # backup remote docker volume to local tar file ssh USER@HOST 'docker run --rm -v VOLUME_NAME:/from alpine ash -c "cd /from ; tar -czf - . "' > FILENAME.tgz