borgbase / vorta

Desktop Backup Client for Borg Backup
https://vorta.borgbase.com
GNU General Public License v3.0
1.99k stars 132 forks source link

Passing `--list` to `borg create` does not cause added or modified files to be listed in the vorta log. #1982

Open LeoniePhiline opened 5 months ago

LeoniePhiline commented 5 months ago

Description

This is a follow-up to https://github.com/borgbase/vorta/discussions/984#discussioncomment-9022445.

Passing --list to borg create does not cause added or modified files to be listed in the vorta log.

I was able to reproduce the issue.

Configure "Extra arguments" with --list, optionally also with --stats:

image

Create a new backup.

Then check the logs.

Result: There's no --list or --stats output in the logs.

Expected: Detailed logs which I can search in and filter on, to verify or correct my configured exclusion patterns.

Environment

Logs

See https://github.com/borgbase/vorta/discussions/984#discussioncomment-8995189

image

The logs look the same also without --dry-run.

goebbe commented 5 months ago

Me too! :-) Using Vorta 9.1. with borg 1.2.7 installed via pip.

The following command is in the logs when I create a backup: 2024-04-05 17:12:54,147 - vorta.borg.borg_job - INFO - Running command /usr/bin/borg create --list --progress --info --log-json --json --filter=AM -C lz4 ssh://admin@192.168.0.5:22/~/backup/vorta_repo_test1::rep-2024-04-05-171254 /home/goebbe/test

The options--list --progress --info --log-jason --joson --filter=AM have not been added manually be me - but seem to be added by Vorta. If I understand correctly these options should result in a detailed output - however the output is not displayed in the logs of Vorta.

To test this I added a new file to my testfolder and ran a backup manually.

m3nu commented 5 months ago

Yes, we need --list to show changed files in the status bar.

LeoniePhiline commented 5 months ago

Hi, thanks for your response! 😊

You added the label “question”, but maybe based upon a misunderstanding?

I believe that the borg output should be redirected into the log file, for the log to be useful at all to debug backup issues.

The borg output missing in the logs is therefore something I personally would consider a bug.

(If you disagree about this being a big, could you then consider regarding this as a feature request, rather than a question?)

m3nu commented 5 months ago

Sending all files to the log will produce a very large log file, so I wouldn't want to do that.

goebbe commented 5 months ago

At the moment even adding the --list option explicitly, as an additional borg argument does not result in the requested output. One hackish solution would be to treat the borg output differently, when --list is added as an additional borg argument. However this might cause some confusion, since Vora adds the --list option internally in any case. So why adding --list explicitly, when it is already added by Vorta (as can be seen in the Vorta logs)?

What about adding the option: "write complete borg output to the logs", which could be off by default? The option could be added to the Settings/ about pane - where Vorta puts the links to the log-files.

LeoniePhiline commented 5 months ago

What about adding the option: "write complete borg output to the logs", which could be off by default? The option could be added to the Settings/ about pane - where Vorta puts the links to the log-files.

I find this to be a very useful solution.