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)