diff options
Diffstat (limited to 'kvm-pull-traces.sh')
| -rwxr-xr-x | kvm-pull-traces.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/kvm-pull-traces.sh b/kvm-pull-traces.sh new file mode 100755 index 0000000..f823360 --- /dev/null +++ b/kvm-pull-traces.sh | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | # | ||
| 3 | # Simple script to download files from a KVM image to the local system. | ||
| 4 | # Originally written by Andrea Bastoni. | ||
| 5 | # Config file support added by Bjoern Brandenburg. | ||
| 6 | |||
| 7 | SSH_PORT=2222 # default | ||
| 8 | SSH_USER=root # what to log in as | ||
| 9 | SSH_HOST=localhost # where is the forwarded port? | ||
| 10 | DATA_DIR="~/liblitmus2010/" # where are the traces in the image? | ||
| 11 | FILE_GLOB="test*.bin" # which files to copy | ||
| 12 | DOWNLOADS=. # where to copy the files | ||
| 13 | |||
| 14 | # include config file | ||
| 15 | [ -f ~/.litmus_kvm ] && source ~/.litmus_kvm | ||
| 16 | |||
| 17 | #SRC="${SSH_USER}@${SSH_HOST}:${DATA_DIR}${FILE_GLOB}" | ||
| 18 | #echo scp -P $SSH_PORT ${SRC} ${DOWNLOADS} | ||
| 19 | #scp -P $SSH_PORT ${SRC} ${DOWNLOADS} | ||
| 20 | |||
| 21 | |||
| 22 | CMD="ssh -l ${SSH_USER} -p ${SSH_PORT}" | ||
| 23 | SRC="${SSH_HOST}:${DATA_DIR}${FILE_GLOB}" | ||
| 24 | echo rsync -ah -z --progress -e "$CMD" ${SRC} ${DOWNLOADS} | ||
| 25 | rsync -ah -z --progress -e "$CMD" ${SRC} ${DOWNLOADS} | ||
