mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
backups: Handle common errors during borg operations
Closes: #2218. - When borg can't acquire a lock due to it being busy, any borg operation can fail. Show a readable message instead of a generic error. - Also handle errors for archive already existing and archive to be deleted not existing. Tests: - Functional tests for backup app work. - Creating archive works with proper message. Providing the name of existing archive shows proper error. - Deleting archive works with proper message. Open two tabs by clicking on the delete archive button. Then delete with one and try to delete the it again with the next one. Proper error message is shown. - While downloading an archive, delete an archive. Proper error message that borg is busy is shown. - Upload archive works. A proper success message is shown. - Restore backup from archive works. A proper success message is shown. - Restore backup from file upload works. A proper success message is shown after upload and after restoration. - Adding local repository works. A proper success message is shown. - Adding remote repository works. A proper success message is shown when SSH key is verified and repository is added. - Removing repository works. A proper success message is shown. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
fd1d13f9af
commit
e0aef43ece
3 files changed
+95
-36
No files matched your search
@@ -21,3 +21,15 @@ class BorgRepositoryExists(BorgError):
|
||||
|
||||
class BorgUnencryptedRepository(BorgError):
|
||||
"""Attempt to provide password on an unencrypted repository."""
|
||||
|
||||
|
||||
class BorgArchiveExists(BorgError):
|
||||
"""A archive with the given name already exists in the repository."""
|
||||
|
||||
|
||||
class BorgArchiveDoesNotExist(BorgError):
|
||||
"""Specified archive does not exist in the repository."""
|
||||
|
||||
|
||||
class BorgBusy(BorgError):
|
||||
"""Borg could not acquire lock being busy with another operation."""
|
||||
Reference in new issue
Block a user