Browse code

Use "receive" instead of "recv" subcommand

Lorenz Hüdepohl authored on 30/11/2017 19:48:00
Showing 1 changed files
... ...
@@ -43,7 +43,7 @@ parser.add_argument('-z', '--compression', action="store_true",
43 43
                     help='Filter network streams through gzip/gunzip')
44 44
 
45 45
 parser.add_argument('-v', '--verbose', action="append_const", const=1,
46
-                    help='Echo the commands that are issued. Two -v pass a -v along to the zfs send/recv commands')
46
+                    help='Echo the commands that are issued. Two -v pass a -v along to the zfs send/receive commands')
47 47
 
48 48
 parser.add_argument('-n', '--dry-run', action="store_true",
49 49
                     help='Only echo the transfer commands that would be issued,\n'
... ...
@@ -290,15 +290,15 @@ for fs, snapname in origin_snapshots:
290 290
     if use_cache_dir:
291 291
         pre_pipe = ["cat", dest_cache_filename, "|"] + pre_pipe
292 292
 
293
-    recv_cmd = ssh_dest + pre_pipe + ["zfs", "recv"] + verbose + ["-u", destination + fs]
293
+    receive_cmd = ssh_dest + pre_pipe + ["zfs", "receive"] + verbose + ["-u", destination + fs]
294 294
 
295 295
     send_shell = not ssh_orig
296 296
     if send_shell:
297 297
         send_cmd = [" ".join(send_cmd)]
298 298
 
299
-    recv_shell = not ssh_dest
300
-    if recv_shell:
301
-        recv_cmd = [" ".join(recv_cmd)]
299
+    receive_shell = not ssh_dest
300
+    if receive_shell:
301
+        receive_cmd = [" ".join(receive_cmd)]
302 302
 
303 303
     # send
304 304
     if use_cache_dir:
... ...
@@ -313,14 +313,14 @@ for fs, snapname in origin_snapshots:
313 313
             print("# Resuming upload of partial stream file")
314 314
 
315 315
         rsync(orig_url, dest_url)
316
-        recv_stdin = None
316
+        receive_stdin = None
317 317
     else:
318
-        # direct `zfs send | zfs recv` pipe
318
+        # direct `zfs send | zfs receive` pipe
319 319
         sender = echoPopen(send_cmd, stdout=PIPE, shell=send_shell)
320
-        recv_stdin = sender.stdout
320
+        receive_stdin = sender.stdout
321 321
 
322
-    # recv
323
-    with echoPopen(recv_cmd, stdin=recv_stdin, shell=recv_shell) as receiver:
322
+    # receive
323
+    with echoPopen(receive_cmd, stdin=receive_stdin, shell=receive_shell) as receiver:
324 324
         receiver.wait()
325 325
         check_returncode(receiver)
326 326