summaryrefslogtreecommitdiffstats
path: root/kvm-pull-traces.sh
diff options
context:
space:
mode:
Diffstat (limited to 'kvm-pull-traces.sh')
-rwxr-xr-xkvm-pull-traces.sh25
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
7SSH_PORT=2222 # default
8SSH_USER=root # what to log in as
9SSH_HOST=localhost # where is the forwarded port?
10DATA_DIR="~/liblitmus2010/" # where are the traces in the image?
11FILE_GLOB="test*.bin" # which files to copy
12DOWNLOADS=. # 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
22CMD="ssh -l ${SSH_USER} -p ${SSH_PORT}"
23SRC="${SSH_HOST}:${DATA_DIR}${FILE_GLOB}"
24echo rsync -ah -z --progress -e "$CMD" ${SRC} ${DOWNLOADS}
25rsync -ah -z --progress -e "$CMD" ${SRC} ${DOWNLOADS}