mirror of
https://github.com/borgbase/vorta
synced 2024-12-21 23:33:13 +00:00
borg2: support >= b10, drop support for < b10. By @ThomasWaldmann (#2102)
- new repo-* commands (previously: r*) - some stats are gone
This commit is contained in:
parent
e631cc45b2
commit
5dada30d9e
6 changed files with 7 additions and 7 deletions
|
@ -7,7 +7,7 @@
|
|||
'DIFF_JSON_LINES': parse_version('1.1.16'),
|
||||
'COMPACT_SUBCOMMAND': parse_version('1.2.0a1'),
|
||||
'V122': parse_version('1.2.2'),
|
||||
'V2': parse_version('2.0.0b1'),
|
||||
'V2': parse_version('2.0.0b10'),
|
||||
# add new version-checks here.
|
||||
}
|
||||
|
||||
|
|
|
@ -294,7 +294,7 @@ def read_async(fd):
|
|||
f"{translate('BorgJob','Files')}: {parsed['nfiles']}, "
|
||||
f"{translate('BorgJob','Original')}: {pretty_bytes(parsed['original_size'])}, "
|
||||
# f"{translate('BorgJob','Compressed')}: {pretty_bytes(parsed['compressed_size'])}, "
|
||||
f"{translate('BorgJob','Deduplicated')}: {pretty_bytes(parsed['deduplicated_size'])}" # noqa: E501
|
||||
f"{translate('BorgJob','Deduplicated')}: {pretty_bytes(parsed.get('deduplicated_size', 0))}" # noqa: E501
|
||||
)
|
||||
self.app.backup_progress_event.emit(f"[{self.params['profile_name']}] {msg}")
|
||||
except json.decoder.JSONDecodeError:
|
||||
|
|
|
@ -27,12 +27,12 @@ def process_result(self, result):
|
|||
'time': dt.fromisoformat(result['data']['archive']['start']).replace(tzinfo=None),
|
||||
'repo': result['params']['repo_id'],
|
||||
'duration': result['data']['archive']['duration'],
|
||||
'size': result['data']['archive']['stats']['deduplicated_size'],
|
||||
'size': result['data']['archive']['stats'].get('deduplicated_size', 0),
|
||||
'trigger': result['params'].get('category', 'user'),
|
||||
},
|
||||
)
|
||||
new_archive.save()
|
||||
if 'cache' in result['data'] and created:
|
||||
if created and 'cache' in result['data'] and 'stats' in result['data']['cache']:
|
||||
stats = result['data']['cache']['stats']
|
||||
repo = RepoModel.get(id=result['params']['repo_id'])
|
||||
repo.total_size = stats['total_size']
|
||||
|
|
|
@ -30,7 +30,7 @@ def prepare(cls, params):
|
|||
ret['ok'] = False # Set back to false, so we can do our own checks here.
|
||||
|
||||
if borg_compat.check('V2'):
|
||||
cmd = ["borg", "rinfo", "--info", "--json", "--log-json", "-r"]
|
||||
cmd = ["borg", "repo-info", "--info", "--json", "--log-json", "-r"]
|
||||
else:
|
||||
cmd = ["borg", "info", "--info", "--json", "--log-json"]
|
||||
cmd.append(profile.repo.url)
|
||||
|
|
|
@ -33,7 +33,7 @@ def prepare(cls, params):
|
|||
if borg_compat.check('V2'):
|
||||
cmd = [
|
||||
"borg",
|
||||
"rcreate",
|
||||
"repo-create",
|
||||
"--info",
|
||||
"--log-json",
|
||||
f"--encryption={params['encryption']}",
|
||||
|
|
|
@ -25,7 +25,7 @@ def prepare(cls, profile):
|
|||
ret['ok'] = False # Set back to false, so we can do our own checks here.
|
||||
|
||||
if borg_compat.check('V2'):
|
||||
cmd = ['borg', 'rlist', '--info', '--log-json', '--json', '-r']
|
||||
cmd = ['borg', 'repo-list', '--info', '--log-json', '--json', '-r']
|
||||
else:
|
||||
cmd = ['borg', 'list', '--info', '--log-json', '--json']
|
||||
cmd.append(f'{profile.repo.url}')
|
||||
|
|
Loading…
Reference in a new issue