summaryrefslogtreecommitdiff
path: root/rdiff-backup/rdiff_backup/Main.py
diff options
context:
space:
mode:
authorowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2007-07-18 21:52:11 +0000
committerowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2007-07-18 21:52:11 +0000
commit467844f89ee7e0feee26effdffc0bddc456ab39f (patch)
tree9ef1a21ce45e999840930cab9c5830c704bc1f20 /rdiff-backup/rdiff_backup/Main.py
parentc0f124d8ed1585a4b852eabe0ed938b4d612b827 (diff)
downloadrdiff-backup-467844f89ee7e0feee26effdffc0bddc456ab39f.tar.gz
Add --tempfile and --remote-tempfile options.
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@829 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/Main.py')
-rw-r--r--rdiff-backup/rdiff_backup/Main.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/rdiff-backup/rdiff_backup/Main.py b/rdiff-backup/rdiff_backup/Main.py
index a363aa5..cf3be6c 100644
--- a/rdiff-backup/rdiff_backup/Main.py
+++ b/rdiff-backup/rdiff_backup/Main.py
@@ -20,7 +20,7 @@
"""Start (and end) here - read arguments, set global settings, etc."""
from __future__ import generators
-import getopt, sys, re, os, cStringIO
+import getopt, sys, re, os, cStringIO, tempfile
from log import Log, LoggerError, ErrorLog
import Globals, Time, SetConnections, selection, robust, rpath, \
manage, backup, connection, restore, FilenameMapping, \
@@ -81,11 +81,11 @@ def parse_cmdlineoptions(arglist):
"no-eas", "no-file-statistics", "no-hard-links", "null-separator",
"override-chars-to-quote=", "parsable-output",
"preserve-numerical-ids", "print-statistics",
- "remote-cmd=", "remote-schema=",
+ "remote-cmd=", "remote-schema=", "remote-tempdir=",
"remove-older-than=", "restore-as-of=", "restrict=",
"restrict-read-only=", "restrict-update-only=", "server",
- "ssh-no-compression", "terminal-verbosity=", "test-server",
- "user-mapping-file=", "verbosity=", "verify",
+ "ssh-no-compression", "tempdir=", "terminal-verbosity=",
+ "test-server", "user-mapping-file=", "verbosity=", "verify",
"verify-at-time=", "version"])
except getopt.error, e:
commandline_error("Bad commandline options: " + str(e))
@@ -176,6 +176,7 @@ def parse_cmdlineoptions(arglist):
restore_timestr, action = arg, "restore-as-of"
elif opt == "--remote-cmd": remote_cmd = arg
elif opt == "--remote-schema": remote_schema = arg
+ elif opt == "--remote-tempdir": Globals.remote_tempdir = arg
elif opt == "--remove-older-than":
remove_older_than_string = arg
action = "remove-older-than"
@@ -193,6 +194,7 @@ def parse_cmdlineoptions(arglist):
Globals.server = 1
elif opt == "--ssh-no-compression":
Globals.set('ssh_compression', None)
+ elif opt == "--tempdir": tempfile.tempdir = arg
elif opt == "--terminal-verbosity": Log.setterm_verbosity(arg)
elif opt == "--test-server": action = "test-server"
elif opt == "--user-mapping-file": user_mapping_filename = arg