chg: sender -> stream
This commit is contained in:
+5
-4
@@ -77,8 +77,8 @@ class Manager:
|
||||
local_dataset, remote_dataset
|
||||
)
|
||||
end_snapshot = self._get_last_snapshot_with_backup_tag(local_dataset)
|
||||
sender = ZFS.send_incremental(start_snapshot, end_snapshot)
|
||||
ZFS.receive(sender, self._external_pool.name)
|
||||
stream = ZFS.send_incremental(start_snapshot, end_snapshot)
|
||||
ZFS.receive(stream, self._external_pool.name)
|
||||
|
||||
def _get_last_snapshot_with_backup_tag(self, local_dataset):
|
||||
snapshots = self._find_snapshots_with_backup_tag(local_dataset)
|
||||
@@ -262,13 +262,14 @@ class ZFS:
|
||||
return sender
|
||||
|
||||
@staticmethod
|
||||
def receive(sender: Popen[str], pool_name):
|
||||
# TODO pool_name --> pool: Pool
|
||||
def receive(stream: Popen[str], pool_name):
|
||||
# -d Discard the first element of the sent snapshot's file system name
|
||||
# -F Force a rollback of the file system to the most recent snapshot before performing the receive operation.
|
||||
# -u File system that is associated with the received stream is not mounted.
|
||||
check_output(
|
||||
[config.ZFS, "receive", "-d", "-F", "-u", pool_name],
|
||||
stdin=sender.stdout,
|
||||
stdin=stream.stdout,
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user