Add support for Borg 2's "rclone://" repository URLs.
This commit is contained in:
parent
e391fd196d
commit
ad21eb41ae
2
NEWS
2
NEWS
@ -19,6 +19,8 @@
|
||||
* #911: Add a "key change-passphrase" action to change the passphrase protecting a repository key.
|
||||
* #921: BREAKING: Change soft failure command hooks to skip only the current repository rather than
|
||||
all repositories in the configuration file.
|
||||
* Add support for Borg 2's "rclone://" repository URLs, so you can backup to 70+ cloud storage
|
||||
services whether or not they support Borg explicitly.
|
||||
|
||||
1.8.14
|
||||
* #896: Fix an error in borgmatic rcreate/init on an empty repository directory with Borg 1.4.
|
||||
|
@ -233,7 +233,9 @@ def normalize(config_filename, config):
|
||||
path=updated_repository_path,
|
||||
)
|
||||
)
|
||||
elif repository_path.startswith('ssh://'):
|
||||
elif repository_path.startswith('ssh://') or repository_path.startswith(
|
||||
'rclone://'
|
||||
):
|
||||
config['repositories'].append(repository_dict)
|
||||
else:
|
||||
rewritten_repository_path = f"ssh://{repository_path.replace(':~', '/~').replace(':/', '/').replace(':', '/./')}"
|
||||
@ -242,7 +244,7 @@ def normalize(config_filename, config):
|
||||
dict(
|
||||
levelno=logging.WARNING,
|
||||
levelname='WARNING',
|
||||
msg=f'{config_filename}: Remote repository paths without ssh:// syntax are deprecated and support will be removed from a future release. Interpreting "{repository_path}" as "{rewritten_repository_path}"',
|
||||
msg=f'{config_filename}: Remote repository paths without ssh:// or rclone:// syntax are deprecated and support will be removed from a future release. Interpreting "{repository_path}" as "{rewritten_repository_path}"',
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -211,6 +211,11 @@ def test_normalize_sections_with_only_scalar_raises():
|
||||
{'repositories': [{'path': 'ssh://foo@bar:1234/repo'}]},
|
||||
True,
|
||||
),
|
||||
(
|
||||
{'repositories': ['rclone://host:/repo']},
|
||||
{'repositories': [{'path': 'rclone://host:/repo'}]},
|
||||
True,
|
||||
),
|
||||
(
|
||||
{'repositories': ['file:///repo']},
|
||||
{'repositories': [{'path': '/repo'}]},
|
||||
|
Loading…
x
Reference in New Issue
Block a user