-
Notifications
You must be signed in to change notification settings - Fork 3
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
Logging is somewhat broken #25
Comments
Error code 109 means there happened some backup tool error. In order to find the root cause of the error tar detected I suggest to use option -v with raspiBackup and check the debug log for error messages from tar. Just paste them here and I will check whether any change in raspiBackup is the root cause for your issue. You detected '--ignore-failed-read' fixes your issue but I suggest to locate the root cause for the issue with option '-v' first. Just to check there is no major tar failure. |
Thanks for fast response and for RaspiBackup @framps ! I found the '--ignore-failed-read' tar option only after I have found (using verbose mode) that tar was failing on files changed during read. In case you have better advice how to solve this issue, I am all ears. I don't remember having this issue with old 6.3.x, which I used for really long time, but it could be caused by newer tar version as well... |
Great. Sou you already did what I suggested to do. Could you please show the list of files which were changed during backup? That way I may be able to check whether some change in raspiBackup 0.6.5 is the root cause. In any case I strongly recommend not to use @christianTF I assume it's OK for you we continue in this issue even it may be a raspiBackup issue? |
@framps Well, this issue is mostly about LB Plugin not handling RaspiBackup logs correctly and basically preventing the debugging of issues (unless you go and edit RaspiConfig manually). This issue is not about the backup issues itself, which can have plethora of reasons and which can be solved in RaspiBackup repo eventually. |
I see. But if you just updated to 0.6.5 and then the issue started to show up for me it sounds it's related to raspiBackup update. I suggest to exclude the files instead of globally ignore all errors. But I agree the raspiBackup Log should not be deleted. That's @christianTF s domain 😉 |
Hi, some clarification about the logs:
From my perspective, I can try to archive the following:
|
👍 I don't think you have to do this.
👍 Looks like the plugin manages the options. An alternative would be to accept raspiBackup invocation options. No sure what's better from an user point of view. But this may create some headache with spaces and quotes.
Do you think it's worth to store the log in memory? Whenever a system dies by some accident the log is gone. Frankly raspiBackup is not able to kill the system if something goes wrong and thus I think it's OK. But in general I wouldn't store important system logs in memory. Edit: Forgot to paste the .vars contents:
Looks like this is not documented on the webpage 😢 . I will add this soon. |
LoxBerry has very sophisticated management of system and plugin logfiles and ramdisk usage, including a logfile database and automatic deletion on several criteria. Linux system logs are in ramdisk too, but survive a reboot. Logfiles neither in the default path nor in the backup destination would be accessible via the WebIf because of permissions, and the plugin uses LoxBerry’s logging SDK. |
@christianTF So the reason why not to put RaspiBackup log in target backup directory is because of permissions? Because apart from that it shouldn't be an issue. As @framp noted, you don't need to detect backup path for setting where to log. In case you would start RaspiBackup from the backup folder and let log path unchanged, it would store it in that folder, as that is the default. So from my point of view, it would be best to keep plugin log in plugin folder, but add "cd Backup_Folder" before the execution of RaspiBackup. Also you are correct with the statement, that the log is accessible in plugin folder. The issue is, that when backup fails, it only contains the log of clean-up stage. Everything else is lost. Not sure, whether this is issue of the plugin or RaspiBackup itself. |
@christianTF Thanks!
My log file contains whole backup stage and is ending with following:
While the @framps Could you confirm, this is expected behavior? Looks like a bug to me. |
Yes, that's expected behavior. Any non zero RC from a backup tool is considered as an backup error. If a file was modified during backup and that's an expected behavior this file has to be added to the exclude list to get a successful backup with raspiBackup. |
Sorry @framps, I probably didn't write it correctly. I was asking whether it is expected, that clean-up stage basically overwrites the backup log, so whole backup log is effectively lost. |
Which raspiBackup version do you use? Please provide the output of |
|
Thank you very much for the version info. If raspiBackup fails the new backup directory is cleaned up. Because default is to store the backup log in the backup directory this will also delete the log. Therefore the log is saved in the callers home directory before cleaning up the backup directory. I just forced a tar backup failure and the log in callers home directory is complete. |
That's weird. |
Capturing the RaspiBackup log of the plugin is “special”, as earlier versions of RaspiBackup didn’t output to STDOUT or STDERR, but to TTY. I use a special call to capture the serial console. The logfile location itself uses
that seems to be not available anymore (it is now missing in the alphabetical parameters list, but still in the thematic list). |
Didn't I change the logic because you asked for it? Anyhow stderr and stdout should be used instead of direct tty output.
It's still available but not documented any more. I had a lot of trouble with users using other backup locations and thus decided to change the default to I try to be backward compatible with a new version of raspiBackup if possible. If options are not documented any more they are still available because of this 😉. |
Yes, you’ve changed this, but I haven’t, because your change was in Dev and later in Beta but not yet in the Release as I had to release 😉 I will do a major code review and update of the plugin somewhere in August or September. |
I see. That's because we don't sync any releases (I don't say we should :-) ). I wish you success in your much more important house project 😉 |
@christianTF I see you have found some time for this plugin. ;-) |
I have been using RaspiBackup on Loxberry 1.x for 3 years without an issue, so I was happy to find there is a plugin for it when I finally upgraded to Loxberry 2.x
But when I tried to use it, I have found few blocking issues:-(
The most painful is, that logging is broken.
When the backup finishes successfully, the only thing that you find in the Loxberry log is this:
Worse is, that when it finishes with error, it is not much better:
This is, quite frankly, totally useless when the backup is failing and you need to find why :-(
Would it be possible to return to default behavior of RaspiBackup and store the log file in the backup folder?
It has several advantages, like:
Just for info, my backups were failing because with new 6.5 version of RaspiBackup you probably need to configure it differently than old versions or it's default behavior changed.
For my case, manually adding the following into "raspiBackup.conf" finally made it working:
Without "--ignore-failed-read" it was always failing on any file changed during backup and if I remember it correctly, without "--one-file-system" it was trying to backup everything on the mounted netshare. This could be probably prevented by excluding "/opt/loxberry/system/storage/smb" path, but using that tar parameter seemed as a better solution to me.
The text was updated successfully, but these errors were encountered: