[enh] Backup mount

This commit is contained in:
ljf 2022-10-16 15:49:24 +02:00
parent be8216c0b4
commit 90de6fdc80
No known key found for this signature in database
3 changed files with 15 additions and 2 deletions

View file

@ -92,6 +92,7 @@
"backup_ask_for_copying_if_needed": "Do you want to perform the backup using {size}MB temporarily? (This way is used since some files could not be prepared using a more efficient method.)", "backup_ask_for_copying_if_needed": "Do you want to perform the backup using {size}MB temporarily? (This way is used since some files could not be prepared using a more efficient method.)",
"backup_borg_init_error": "Unable initialize the borg repository: {error}", "backup_borg_init_error": "Unable initialize the borg repository: {error}",
"backup_borg_list_archive_error": "Unable to list files in the archive", "backup_borg_list_archive_error": "Unable to list files in the archive",
"backup_borg_mount_archive_error": "Unable to mount the archive here: {error}",
"backup_cant_mount_uncompress_archive": "Could not mount the uncompressed archive as write protected", "backup_cant_mount_uncompress_archive": "Could not mount the uncompressed archive as write protected",
"backup_cleaning_failed": "Could not clean up the temporary backup folder", "backup_cleaning_failed": "Could not clean up the temporary backup folder",
"backup_copying_to_organize_the_archive": "Copying {size}MB to organize the archive", "backup_copying_to_organize_the_archive": "Copying {size}MB to organize the archive",

View file

@ -1085,6 +1085,18 @@ backup:
name: name:
help: Name of the local backup archive help: Name of the local backup archive
### backup_mount()
mount:
action_help: Mount a backup archive if possible
api: DELETE /backups/<name>
arguments:
repository:
help: Repository of the backup archive
name:
help: Name of the backup archive
path:
help: Path where mount the archive
### backup_delete() ### backup_delete()
delete: delete:
action_help: Delete a backup archive action_help: Delete a backup archive

View file

@ -1879,12 +1879,12 @@ def backup_download(repository, name):
return archive.download() return archive.download()
def backup_mount(name, repository, path): def backup_mount(repository, name, path):
repo = BackupRepository(repository) repo = BackupRepository(repository)
archive = BackupArchive(repo, name) archive = BackupArchive(repo, name)
return archive.mount(path) archive.mount(path)
def backup_info(repository, name, with_details=False, human_readable=False): def backup_info(repository, name, with_details=False, human_readable=False):