Written by: Robert R. Russell on Thursday, August 13, 2020.
Now that I can read a list of snapshots, I need to read a snapshot and transfer
it to the destination. The three functions that allow me to do that are
exec.StdinPipe(),
exec.StdoutPipe(),
and io.CopyBuffer().
The process consists of the following steps:
exec.StdoutPipe() to connect a pipe to the output of the command
created in step 1.exec.StdinPipe() to connect a pipe to the input of the command created
in step 3.io.CopyBuffer() to read from the snapshot to the receiver.You can view the code here.
©2020 Robert R. Russell — All rights reserved