backup: Refuse to create a new FileBakend if the backing file exists

This commit is contained in:
Christian Decker
2020-04-05 15:42:25 +02:00
parent ce49404eb4
commit ef31a4ac85
2 changed files with 7 additions and 4 deletions

View File

@@ -12,7 +12,7 @@ import sys
@click.argument("backend-url")
def init(lightning_dir, backend_url):
destination = backend_url
backend = get_backend(destination)
backend = get_backend(destination, create=True)
backend.version, backend.prev_version = 0, 0
backend.offsets = [512, 0]
backend.version_count = 0