vorta
vorta copied to clipboard
Unable to use some placeholders in archive names
Description
When trying to add the following placeholders (see here) to the archive name, Vorta says "Error in archive name template.":
- {reverse-fqdn}
- {utcnow}
- {pid}
- {borgversion}
- {borgmajor}
- {borgminor}
- {borgpatch}
When I navigate away from that tab in Vorta (e.g. to the "Schedule" tab) and then go back, the "problematic" part of the archive name is removed from the text input field
Reproduction
- [X] I tried to reproduce the issue.
- [X] I was able to reproduce the issue.
OS
Kubuntu 22.10
Version of Vorta
0.9.1
What did you install Vorta with?
Flatpak
Version of Borg
1.2.4 according to Vorta, 1.2.6 according to borg --version
(I guess one comes with the Flatpak and the other is a deb package)
Logs
No response
We may not pass those to Borg and our current placeholders are filled by Vorta only. I think. If this is the case, we should look into passing them through, as you expect here.
@m3nu I think that if we pass them through to borg, we may not be able to show the preview. We can just add the missing keys from borg to vorta.
https://github.com/borgbackup/borg/blob/b82bf4a232c6c7d63796d2366a147f74c5ab13dc/src/borg/helpers/parseformat.py#L264C5-L272C20
Will this change solve it for you, @daPhipz ? It's a clever change actually.
@m3nu I think that if we pass them through to borg, we may not be able to show the preview. We can just add the missing keys from borg to vorta.
https://github.com/borgbackup/borg/blob/b82bf4a232c6c7d63796d2366a147f74c5ab13dc/src/borg/helpers/parseformat.py#L264C5-L272C20
I don't really know how to (read that) code - would this solution mean that the placeholders would work, but the preview text under the text field could be wrong? Or where is the compromise?
I personally don't care about the preview if the actual naming works, but maybe the user should be informed in that case.
Both (Placeholders and the Preview) will work here. The naming would be same as preview.
In that case, I am perfectly fine with this solution! Thank you very much for this quick PR! :heart_eyes:
@m3nu, is this PR good to be closed then?
Yes, we will merge it. Let's just give others a chance to look at it too.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue was closed because it has been stalled for 7 days with no activity.
Could someone reopen this, since there is already a PR in the works?