diff --git a/src/borg/helpers/manifest.py b/src/borg/helpers/manifest.py index 5b595eacb9..1de7e89f5e 100644 --- a/src/borg/helpers/manifest.py +++ b/src/borg/helpers/manifest.py @@ -28,7 +28,8 @@ class MandatoryFeatureUnsupported(Error): ArchiveInfo = namedtuple('ArchiveInfo', 'name id ts') -AI_HUMAN_SORT_KEYS = ['timestamp'] + list(ArchiveInfo._fields) +# timestamp is a replacement for ts, archive is an alias for name (see SortBySpec) +AI_HUMAN_SORT_KEYS = ['timestamp', 'archive'] + list(ArchiveInfo._fields) AI_HUMAN_SORT_KEYS.remove('ts') diff --git a/src/borg/helpers/parseformat.py b/src/borg/helpers/parseformat.py index 1e11ea61dd..03e9c20a43 100644 --- a/src/borg/helpers/parseformat.py +++ b/src/borg/helpers/parseformat.py @@ -228,7 +228,7 @@ def SortBySpec(text): for token in text.split(','): if token not in AI_HUMAN_SORT_KEYS: raise argparse.ArgumentTypeError('Invalid sort key: %s' % token) - return text.replace('timestamp', 'ts') + return text.replace('timestamp', 'ts').replace('archive', 'name') def format_file_size(v, precision=2, sign=False, iec=False):