Skip to content
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

No output in /var/log/backup_borg.log #26

Closed
BCITMike opened this issue Feb 25, 2019 · 3 comments
Closed

No output in /var/log/backup_borg.log #26

BCITMike opened this issue Feb 25, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@BCITMike
Copy link

I do get errors in /var/log/backup_borg.err, but not in backup_borg.log. I am expecting to be able to tail that file and see what borg is doing. Right?

Also, it would be good to use the current_date variable to add timestamps to the log files.

@zamentur zamentur added the bug Something isn't working label Apr 24, 2019
@eauchat
Copy link
Contributor

eauchat commented Apr 17, 2020

Same here, I also have no logs in /var/log/backup_borg.log while there are some in /var/log/backup_borg.err

@eauchat
Copy link
Contributor

eauchat commented Oct 6, 2020

Looking a bit deeper in borg_ynh code and borg documentation. It seems to make sense that there are no logs in /var/log/backup_borg.log.

From borg manpage:

Borg writes all log output to stderr by default. But please note that something showing up on stderr does not indicate an error condition just because it is on stderr.
Please check the log levels of the messages and the return code of borg for determining error, warning or success conditions.
If you want to capture the log output to a file, just redirect it:
borg create repo::archive myfiles 2>> logfile

Output level can be customized via the BORG_LOGGING_CONF environment variable, but it doesn't seem to allow to change where the logs are actually sent.

So it doesn't seem useful to have the >> $LOGFILE part in borg [init/create/prune/mount] ... >> $LOGFILE 2>> $ERRFILE lines.

Also, for the second thing mentioned by @BCITMike, the timestamps, I didn't find anything in borg documentation that would enable that. But this can be achieved with a bit of bash syntax.

I proposed a patch to solve those two issues #55.

@eauchat
Copy link
Contributor

eauchat commented Dec 1, 2020

I guess this issue can be closed now that #55 has been merged.

@BCITMike BCITMike closed this as completed Dec 1, 2020
@shukon shukon mentioned this issue Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants