mirror of
https://github.com/psy0rz/zfs_autobackup.git
synced 2025-04-13 22:47:12 +03:00
Handle local and remote dataset escaping differently
This commit is contained in:
parent
3dbd45ed4a
commit
748e6d4739
@ -228,7 +228,10 @@ def zfs_transfer(ssh_source, source_filesystem, first_snapshot, second_snapshot,
|
||||
verbose("Tranferring "+source_filesystem+" incremental backup between snapshots "+first_snapshot+"..."+second_snapshot)
|
||||
source_cmd.extend([ "-i", first_snapshot ])
|
||||
# FIXME needs attention
|
||||
source_cmd.append(source_filesystem.replace(' ', '\ ') + "@" + second_snapshot)
|
||||
if ssh_source != "local":
|
||||
source_cmd.append(source_filesystem.replace(' ', '\ ') + "@" + second_snapshot)
|
||||
else:
|
||||
source_cmd.append(source_filesystem + "@" + second_snapshot)
|
||||
|
||||
# if ssh_source != "local":
|
||||
# #add buffer
|
||||
@ -251,8 +254,10 @@ def zfs_transfer(ssh_source, source_filesystem, first_snapshot, second_snapshot,
|
||||
if args.verbose or args.debug:
|
||||
target_cmd.append("-v")
|
||||
# FIXME needs attention
|
||||
target_cmd.append(target_filesystem.replace(' ', '\ '))
|
||||
|
||||
if ssh_target != "local":
|
||||
target_cmd.append(target_filesystem.replace(' ', '\ '))
|
||||
else:
|
||||
target_cmd.append(target_filesystem)
|
||||
|
||||
#### make sure parent on target exists
|
||||
parent_filesystem= "/".join(target_filesystem.split("/")[:-1])
|
||||
|
Loading…
x
Reference in New Issue
Block a user