mirror of
https://github.com/psy0rz/zfs_autobackup.git
synced 2025-06-19 02:33:51 +03:00
fix
This commit is contained in:
parent
6e8cb796fe
commit
453f052a20
@ -379,12 +379,7 @@ class ZfsDataset:
|
|||||||
|
|
||||||
def is_ours(self):
|
def is_ours(self):
|
||||||
"""return true if this snapshot name belong to the current backup_name and snapshot formatting"""
|
"""return true if this snapshot name belong to the current backup_name and snapshot formatting"""
|
||||||
try:
|
return self.timestamp is not None
|
||||||
test = self.timestamp
|
|
||||||
except ValueError as e:
|
|
||||||
return False
|
|
||||||
|
|
||||||
return True
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def holds(self):
|
def holds(self):
|
||||||
@ -417,10 +412,11 @@ class ZfsDataset:
|
|||||||
:rtype: int|None
|
:rtype: int|None
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if not self.is_ours():
|
try:
|
||||||
|
dt = datetime.strptime(self.snapshot_name, self.zfs_node.snapshot_time_format)
|
||||||
|
except ValueError:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
dt = datetime.strptime(self.snapshot_name, self.zfs_node.snapshot_time_format)
|
|
||||||
if sys.version_info[0] >= 3:
|
if sys.version_info[0] >= 3:
|
||||||
from datetime import timezone
|
from datetime import timezone
|
||||||
if self.zfs_node.utc:
|
if self.zfs_node.utc:
|
||||||
@ -1057,7 +1053,7 @@ class ZfsDataset:
|
|||||||
Returns:
|
Returns:
|
||||||
tuple: A tuple containing:
|
tuple: A tuple containing:
|
||||||
- ZfsDataset: The common snapshot
|
- ZfsDataset: The common snapshot
|
||||||
- ZfsDataset: The start snapshot
|
- ZfsDataset: The start snapshotplan_
|
||||||
- list[ZfsDataset]: Our obsolete source snapshots, after transfer is done. (will be thinned asap)
|
- list[ZfsDataset]: Our obsolete source snapshots, after transfer is done. (will be thinned asap)
|
||||||
- list[ZfsDataset]: Our obsolete target snapshots, after transfer is done. (will be thinned asap)
|
- list[ZfsDataset]: Our obsolete target snapshots, after transfer is done. (will be thinned asap)
|
||||||
- list[ZfsDataset]: Transfer target snapshots. These need to be transferred.
|
- list[ZfsDataset]: Transfer target snapshots. These need to be transferred.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user