From 79e8133bb524e037936e77ae79a79cd3e0298258 Mon Sep 17 00:00:00 2001 From: Nathan Denny Date: Thu, 3 Oct 2024 04:10:35 -0400 Subject: [PATCH] bug hunting --- lib/Bastion/Vaults/BFD.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/Bastion/Vaults/BFD.py b/lib/Bastion/Vaults/BFD.py index 54b8609..b64c7bd 100644 --- a/lib/Bastion/Vaults/BFD.py +++ b/lib/Bastion/Vaults/BFD.py @@ -138,29 +138,32 @@ def push(self, asset, basis = None, **kwargs): """ detail = 'F' whence = None - genus = None + basis = None blonded = None tarp = None ark = asset.ARK opts = { } - if anchor: + if basis: detail = 'D' if isinstance(basis, BLONDE): - whence = basis.when.earliest - genus = basis.genus + #-- I was given a BLONDE (a reference to a full backup) + anchor = basis + whence = anchor.when.earliest + genus = anchor.genus + blonded = BLONDE.forDiffBackup(anchor) + if isinstance(basis, datetime.datetime): whence = basis genus = "___" - blonded = BLONDE(asset.ARK, detail, genus) + blonded = BLONDE(asset.ARK, detail, genus) - tarp = "{}.tar".format(str(blonded)) opts['since'] = whence else: - blonded = BLONDE(asset.ARK, detail, branch) - tarp = "{}.tar".format(str(blonded)) + blonded = BLONDE.forFullBackup(asset.ARK) + tarp = "{}.tar".format(str(blonded)) #-- assure that the scratch and bank paths exist. (self.scratch / ark.site / ark.zone / ark.asset).mkdir(parents = True, exist_ok = True)