add: some print statements
This commit is contained in:
@@ -58,6 +58,7 @@ class Manager:
|
|||||||
self._external_pool.export()
|
self._external_pool.export()
|
||||||
|
|
||||||
def _backup_all_datasets(self):
|
def _backup_all_datasets(self):
|
||||||
|
print("Backing up datasets")
|
||||||
for local_dataset in self._datasets_to_backup:
|
for local_dataset in self._datasets_to_backup:
|
||||||
remote_dataset = self._search_matching_dataset_in_remote_pool(
|
remote_dataset = self._search_matching_dataset_in_remote_pool(
|
||||||
local_dataset, self._external_pool
|
local_dataset, self._external_pool
|
||||||
@@ -241,6 +242,7 @@ class ZFS:
|
|||||||
def send_incremental(old_snap: Snapshot, new_snap: Snapshot) -> Popen[str]:
|
def send_incremental(old_snap: Snapshot, new_snap: Snapshot) -> Popen[str]:
|
||||||
if old_snap.dataset != new_snap.dataset:
|
if old_snap.dataset != new_snap.dataset:
|
||||||
raise ValueError(SAME_DATASET)
|
raise ValueError(SAME_DATASET)
|
||||||
|
print(f" {old_snap} -> {new_snap}")
|
||||||
sender = Popen(
|
sender = Popen(
|
||||||
[config.ZFS, "send", "-R", "-I", old_snap, new_snap], stdout=PIPE
|
[config.ZFS, "send", "-R", "-I", old_snap, new_snap], stdout=PIPE
|
||||||
)
|
)
|
||||||
@@ -337,6 +339,7 @@ class ExternalPool(Pool):
|
|||||||
self._export_pool()
|
self._export_pool()
|
||||||
self._disk.encrypt()
|
self._disk.encrypt()
|
||||||
self._imported = False
|
self._imported = False
|
||||||
|
print(f"Exported {self.name}. Disk {self._disk.uuid} can be removed.")
|
||||||
|
|
||||||
def _import_from_directory(self, directory: Path) -> None:
|
def _import_from_directory(self, directory: Path) -> None:
|
||||||
ZFS.import_pool_from_directory(self._name, directory)
|
ZFS.import_pool_from_directory(self._name, directory)
|
||||||
@@ -345,6 +348,7 @@ class ExternalPool(Pool):
|
|||||||
ZFS.export_pool(self._name)
|
ZFS.export_pool(self._name)
|
||||||
|
|
||||||
def scrub(self) -> None:
|
def scrub(self) -> None:
|
||||||
|
print(f"Scrubbing {self._name}")
|
||||||
ZFS.scrub(self._name)
|
ZFS.scrub(self._name)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -427,6 +431,9 @@ class Snapshot:
|
|||||||
def __lt__(self, other: Snapshot) -> bool:
|
def __lt__(self, other: Snapshot) -> bool:
|
||||||
return self.snapname < other.snapname
|
return self.snapname < other.snapname
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return str(self._path)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def snapname(self) -> str:
|
def snapname(self) -> str:
|
||||||
return self._path.snapname
|
return self._path.snapname
|
||||||
|
|||||||
Reference in New Issue
Block a user