summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2010-05-29 21:57:41 (GMT)
committerAdrian C. (anrxc) <anrxc@sysphere.org>2010-05-29 21:57:41 (GMT)
commitac23671386353371d759608fe8d09c72de78ae02 (patch)
tree223f48385e84a1b8ffd55779c0e02d55aa1d8666
parent165e534b291d3048f6e9e1bc4567670014cce51a (diff)
downloadrybackup-ac23671386353371d759608fe8d09c72de78ae02.tar.xz
rybackup: mount options can be omitted
-rwxr-xr-xrybackup.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/rybackup.py b/rybackup.py
index eab93dd..259dbcd 100755
--- a/rybackup.py
+++ b/rybackup.py
@@ -34,14 +34,14 @@ from os import listdir, makedirs
bak = {
"dst" : "/mnt/nfs/backup",
"src" : [ "/etc/", "/root/", "/home/user/", "/mnt/storage/Documents/" ],
- "efs" : False, # eCryptfs support
+ "efs" : False, # eCryptfs support
}
# Remote backup server, or removable storage
rmt = {
- "fst" : "nfs", # file-system type
- "opt" : "async,vers=3", # mount options
- "dev" : "192.168.0.10", # device node or NFS server
+ "fst" : "nfs", # file-system type
+ "opt" : "-o async,vers=3", # mount options, if any
+ "dev" : "192.168.0.10", # device node or NFS host
"dst" : "/mnt/backup/clientname" # remote NFS export
}
@@ -138,9 +138,9 @@ def mount(action):
rmt['dev'] = "%s:%s" % (rmt['dev'], rmt['dst'])
# Attempt to mount the destination
- if call("%s -t %s -o %s %s %s"
- % (bin[action], rmt['fst'], rmt['opt'],
- rmt['dev'], bak['dst']), shell=True) != 0:
+ if call("%s -t %s %s %s %s"
+ % (bin[action], rmt['fst'], rmt['opt'],
+ rmt['dev'], bak['dst']), shell=True) != 0:
raise SystemExit("Error: could not mount destination")
elif action == "umount":
# Unmount the snapshot mountpoint