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