-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extra borg arguments with white space raise an error #2164
Comments
Here is the extract from the log file when using: Extract from the log file:
Again, when copying the "Running command" to the terminal, the execution went fine. |
I try to understand the source of the issue and collect some insights, here. First, in
Here, the .split() function splits item-names with white-space into two parts:
Note that Now with respect to the (correct) borg command, that is printed in the log-file: Next, in line 233, the
Here, Vorta passes the list of options to the Pipe. (to get the command executed(?) Current working hypothesis: |
The likely solution is to use of
The resulting However, the resulting Perhaps one way to construct the borg-shell-command would be to simply replace the whitespace by an escaped whitespace, before joining the resulting arguments, as follows?
|
A Vorta user had a hard time when pattern matching a folder-name with white space: #2156 (reply in thread)
Since matching names that contain a single space is a common use case, I decided to open this issue.
I am able to reproduce the issues, using Vorta 0.10.1 with borg 1.4 on LinuxMint22 (based on Ubuntu 24.4)
The issue appears e.g. when trying to pattern match an item name (Folder/ File) that contains white space,
via Vortas "Extra borg arguments for borg create" found at Vorta>Schedule>Shell Commands>Extra arguments for borg create.
To reproduce, I created a folder named
test folder
, with a single space in the middle of the folder-name.I used the following
--pattern
option matcher and tried to exclude the folder from my backup by passing:--pattern=-home/User/test\ folder
This led to an error message:
borg create:error: argument ARCHIVE: "folder": No archive specified
.This is the borg command from the Vorta log files:
/usr/bin/borg create --remote-path=/usr/local/bin/borg --list --progress --info --log-json --json --filter=AM -C lz4 --pattern=-home/User/test\ folder ssh://backupUser@192.168.0.5:22/~/backup/vorta-repo-EB845::User-EliteBook-845-2024-12-06-110323 /home/User
Since this borg command in the log-files seems to be correct, I presumed, that his must be a borg issue and opened an issue on borg: borgbackup/borg#8578
However, it appears that the borg command (from the Vorta logs) actually work as expected, when copied and executed directly on the command line.
To summarize the issue:
The following syntax works for matching
test folder
with a white space, when using borg directly on the command line:However, when passing these valid options using Vorta (Extra borg arguments) an error is raised:
The error messages differ slightly, depending on which of the three options are used with Vorta.
But while each of these option works on the command line, none of these options could be used successfully when passed/ applied via Vorta.
Extract from the Vorta log files when escaping the white space by
\
:The text was updated successfully, but these errors were encountered: