feat: implement support for borg export-tar#2407
Open
mr-raj12 wants to merge 2 commits intoborgbase:masterfrom
Open
feat: implement support for borg export-tar#2407mr-raj12 wants to merge 2 commits intoborgbase:masterfrom
mr-raj12 wants to merge 2 commits intoborgbase:masterfrom
Conversation
This adds the ability to export archives to tarballs directly from the UI, wrapping the 'borg export-tar' command. Changes: - Added 'BorgExportTar' class to handle command construction (supports both Borg 1.x and future versions). - Created 'ExportTarDialog' UI to capture export options: - Destination path - Compression mode (auto-detects from filename or manual selection) - Number of path components to strip - Added 'Export to Tarball' action to the Archive tab context menu. - Added comprehensive unit tests for the dialog logic and command generation.
Adds support for: - Exclude patterns (--exclude) - Specific path extraction - Tar format selection (--tar-format, for Borg V2) - Updates UI to include these new fields.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR implements the "Export to Tarball" feature by wrapping the
borg export-tarcommand. It allows users to export an existing archive to a compressed tarball directly from the Vorta UI.Detailed Changes:
BorgExportTarclass (src/vorta/borg/export_tar.py) to construct the borg command with proper flags, including support forborg1.x syntax.ExportTarDialog(src/vorta/views/export_tar_dialog.pyand corresponding.uifile).--strip-components.src/vorta/views/archive_tab.py).tests/unit/test_export_tar.py: Verifies command string generation.tests/unit/test_export_tar_dialog.py: Verifies dialog logic, auto-compression detection, and job submission.Related Issue
Closes #2406
Motivation and Context
borg export-taris a core BorgBackup feature that was missing from the Vorta GUI. Users previously had to use the command line to export archives to standalone files. This addition streamlines the restore/export workflow for users who need to transfer data to systems without Borg installed.How Has This Been Tested?
Environment: Linux (Ubuntu/Debian), Python 3.12, Qt6 via PyQt6.
/tmp/test.tar.gz.tar -tvf).pytest tests/unit/test_export_tar.pyandtests/unit/test_export_tar_dialog.py.pre-commithooks pass (Ruff formatting, whitespace checks).Screenshots (if appropriate):
Types of changes
Checklist:
I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.