ssh server1 'docker run --rm -v :/from alpine ash -c "cd /from ; tar -cf - . "' | ssh server2 'docker run --rm -i -v ´:/to alpine ash -c "cd /to ; tar -xpvf - " '
I hereby claim:
- I am tillepille on github.
- I am tillepille (https://keybase.io/tillepille) on keybase.
- I have a public key ASCNAJSBwFTgwrbLviOjoqBPzb_9AAL9OTSMojMDQfeg-Ao
To claim this, I am signing this object:
This file contains 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 characters
#!/bin/bash | |
set -e | |
function replace_value(){ | |
local key=$1 | |
local value=$2 | |
local file=$3 | |
jq .$key="\"$value\"" $file > tmpfile && mv tmpfile $file | |
} |