Merge pull request #6974 from ThomasWaldmann/fixes-master

misc fixes
This commit is contained in:
TW 2022-08-17 08:31:58 +02:00 committed by GitHub
commit 709d162ee7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -193,16 +193,17 @@ class PruneMixIn:
archive (and thus still needed). Checkpoint archives are not considered when
comparing archive counts against the retention limits (``--keep-X``).
If a prefix is set with -P, then only archives that start with the prefix are
If you use --glob-archives (-a), then only archives that match the GLOB are
considered for deletion and only those archives count towards the totals
specified by the rules.
Otherwise, *all* archives in the repository are candidates for deletion!
There is no automatic distinction between archives representing different
contents. These need to be distinguished by specifying matching prefixes.
contents. These need to be distinguished by specifying matching globs.
If you have multiple sequences of archives with different data sets (e.g.
from different machines) in one shared repository, use one prune call per
data set that matches only the respective archives using the -P option.
data set that matches only the respective archives using the --glob-archives
(-a) option.
The ``--keep-within`` option takes an argument of the form "<int><char>",
where char is "H", "d", "w", "m", "y". For example, ``--keep-within 2d`` means

View File

@ -3195,7 +3195,6 @@ class ArchiverTestCase(ArchiverTestCaseBase):
assert sha256_before == sha256_after
def test_recreate_timestamp(self):
local_timezone = datetime.now(timezone(timedelta(0))).astimezone().tzinfo
self.create_test_files()
self.cmd(f"--repo={self.repository_location}", "rcreate", RK_ENCRYPTION)
self.cmd(f"--repo={self.repository_location}", "create", "test0", "input")
@ -3209,8 +3208,8 @@ class ArchiverTestCase(ArchiverTestCaseBase):
"test",
)
info = self.cmd(f"--repo={self.repository_location}", "info", "-a", "test0").splitlines()
dtime = datetime(1970, 1, 2) + local_timezone.utcoffset(None)
s_time = dtime.strftime("%Y-%m-%d")
dtime = datetime(1970, 1, 2, 0, 0, 0).astimezone() # local time in local timezone
s_time = dtime.strftime("%Y-%m-%d %H:%M:.. %z").replace("+", r"\+")
assert any([re.search(r"Time \(start\).+ %s" % s_time, item) for item in info])
assert any([re.search(r"Time \(end\).+ %s" % s_time, item) for item in info])