40 |
return rp |
return rp |
41 |
|
|
42 |
def rdiff_backup(source_local, dest_local, src_dir, dest_dir, |
def rdiff_backup(source_local, dest_local, src_dir, dest_dir, |
43 |
current_time = None, extra_options = ""): |
current_time = None, extra_options = "", |
44 |
|
check_return_val = 1): |
45 |
"""Run rdiff-backup with the given options |
"""Run rdiff-backup with the given options |
46 |
|
|
47 |
source_local and dest_local are boolean values. If either is |
source_local and dest_local are boolean values. If either is |
71 |
cmdargs.extend([src_dir, dest_dir]) |
cmdargs.extend([src_dir, dest_dir]) |
72 |
cmdline = " ".join(cmdargs) |
cmdline = " ".join(cmdargs) |
73 |
print "Executing: ", cmdline |
print "Executing: ", cmdline |
74 |
assert not os.system(cmdline) |
ret_val = os.system(cmdline) |
75 |
|
if check_return_val: assert not ret_val, ret_val |
76 |
|
return ret_val |
77 |
|
|
78 |
def cmd_schemas2rps(schema_list, remote_schema): |
def cmd_schemas2rps(schema_list, remote_schema): |
79 |
"""Input list of file descriptions and the remote schema, return rps |
"""Input list of file descriptions and the remote schema, return rps |