summaryrefslogtreecommitdiff
path: root/seivot
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-05-16 13:51:14 +0100
committerLars Wirzenius <liw@liw.fi>2011-05-16 13:51:14 +0100
commit90893c52ac16c4838ed2c918c9c6e6884e3aa08c (patch)
tree3e3c7e31c082b08006db17f14a92b4c8c2fff46c /seivot
parent36931b654d8e155e73a0209a9180a1fb91ba2a60 (diff)
parent6eaccf53f9e6fa2014026b87704b30793d2de8b4 (diff)
downloadseivot-90893c52ac16c4838ed2c918c9c6e6884e3aa08c.tar.gz
Merge sftp support.
Diffstat (limited to 'seivot')
-rwxr-xr-xseivot11
1 files changed, 10 insertions, 1 deletions
diff --git a/seivot b/seivot
index ac04a42..e31a938 100755
--- a/seivot
+++ b/seivot
@@ -318,6 +318,10 @@ class Seivot(cliapp.Application):
'running commands (will ask for '
'sudo pasword')
+ self.settings.add_boolean_setting(['use-sftp'],
+ 'access backup repository over the '
+ 'network via sftp')
+
def process_args(self, args):
progname = self.settings['program']
logging.info('Benchmarking: %s' % progname)
@@ -329,8 +333,13 @@ class Seivot(cliapp.Application):
self.live_data = os.path.join(self.tempdir, 'data')
self.repo = os.path.join(self.tempdir, 'repo')
+ if self.settings['use-sftp']:
+ repo_url = 'sftp://localhost%s' % self.repo
+ else:
+ repo_url = self.repo
+
prog = self.factory.new(progname, live_data=self.live_data,
- repo=self.repo,
+ repo=repo_url,
settings=self.settings)
prog.prepare()