summaryrefslogtreecommitdiff
path: root/rybackup.py
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2010-06-03 22:44:54 +0200
committerAdrian C. (anrxc) <anrxc@sysphere.org>2010-06-03 22:57:42 +0200
commit1c6735d16bef0aa304530001280935a5e65d405f (patch)
tree688880b176bc43b8d95be4a8d80e4c595c999301 /rybackup.py
parent6f63f9fae8af223bc82b696e989fd1b9b7985161 (diff)
downloadrybackup-1c6735d16bef0aa304530001280935a5e65d405f.tar.xz
rybackup: allow fstab mounts and sshfs
Omitting all remote settings the mount command in the end calls only: "mount /mnt/destination". Also, by using "fuse" as remote fs-type and "sshfs#user@server:" as dev we should be able to perform sshfs mounts (port if needed can be specified in the options like: "port=portnum").
Diffstat (limited to 'rybackup.py')
-rwxr-xr-xrybackup.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/rybackup.py b/rybackup.py
index f78d18f..4e734be 100755
--- a/rybackup.py
+++ b/rybackup.py
@@ -39,7 +39,7 @@ bak = {
# Remote backup server, or removable storage
rmt = {
- "fst" : "nfs", # file-system type
+ "fst" : "-t 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
@@ -134,13 +134,12 @@ def mount(action):
if action == "mount":
# Include the export for NFS
- if rmt['fst'] == "nfs":
+ if rmt['fst'] == "-t nfs":
rmt['dev'] = "%s:%s" % (rmt['dev'], rmt['dst'])
# Attempt to mount the destination
- if call("%s -t %s %s %s %s"
- % (bin[action], rmt['fst'], rmt['opt'],
- rmt['dev'], bak['dst']), shell=True) != 0:
+ if call("%s %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