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

V0.6.4.1-beta Sample Extensions need updating #78

Closed
pchristod opened this Issue Oct 19, 2018 · 14 comments

Comments

Projects
None yet
3 participants
@pchristod
Copy link

pchristod commented Oct 19, 2018

Hi,

I've been testing the Beta since it was released. I haven't had any Problems apart from the outdated Sample Extensions. I'm guessing the Code has changes somehow? The output in the E-Mail looks like this:

10-19-2018 03:39:43 --- RBK1000I: CPU Temperatur vor und nach dem Backup: %1 - %2
10-19-2018 03:39:43 --- RBK1001I: Speicherauslastung - Vor dem Backup: Belegt: %1 Frei: %2 - Nach dem Backup: Belegt: %3 Frei: %4
10-19-2018 03:39:43 --- RBK1002I: Partitionsauslastung vor dem Backup: Belegt: %1 Frei: %2
10-19-2018 03:39:43 --- RBK1003I: Partitionsauslastung nach dem Backup: Belegt: %1 Frei: %2
10-19-2018 03:39:43 --- RBK1004I: Änderung freier Platz: %1 (%2 %)

OS is Raspbian Stretch.
Thanks!

@framps framps self-assigned this Oct 19, 2018

@framps

This comment has been minimized.

Copy link
Owner

framps commented Oct 19, 2018

Thank you very much for testing the beta and reporting the issue.

Good catch 👍 👍 👍

The message format for the parameters changed. I missed to update the messages in the extensions 😢 😢 😢

I updated the message used in the extensions in the beta branch. Would be great if you grab the updated extensions from there and test again. But please save the old extensions. There is no supported way to revert to previous extensions with raspiBackup.

@framps framps added the bug label Oct 19, 2018

@framps

This comment has been minimized.

Copy link
Owner

framps commented Oct 19, 2018

Just noticed this is another issue I have to handle somehow.Upgrading of raspiBackup with option -U will not upgrade the extensions 😞

@pchristod

This comment has been minimized.

Copy link
Author

pchristod commented Oct 19, 2018

Thanks, I will update the Extensions and will report back after my next automatic Backup run.
About the other Issue, I remember the same thing happened to the Config File, this was also not updated, I think you changes that? Why not do it the same way?
Or maybe add an Message by the end of the Upgrade Process so the User can to it himself?

@framps

This comment has been minimized.

Copy link
Owner

framps commented Oct 19, 2018

Thank you very much for testing the fix.

You are right - upgrade of the the config and extension is not handled by raspiBackup. Actually it's because the config usually will be updated on your system and an update shouldn't overwrite the current config.
The sample extensions are are just samples and not considered to be handled by the upgrade process.
There was already an issue created regarding config merge during upgrade. That's not easy to handle because the config file has no structured format.

I'll create an issue on this to handle upgrade of samples and configs in next release.

@pchristod

This comment has been minimized.

Copy link
Author

pchristod commented Oct 21, 2018

Hi, good morning,

I remembered I could test via -F so I did that, unfortunately there is still something missing (probably small). Here's the Output, the Message has changed a little bit:

10-21-2018 09:44:41 --- RBK1000I: CPU Temperatur vor und nach dem Backup: %s - %s
10-21-2018 09:44:41 --- RBK1001I: Speicherauslastung - Vor dem Backup - Belegt: %s MB Frei: %s MB - Nach dem Backup: Belegt: %s MB Frei: %s MB
10-21-2018 09:44:41 --- RBK1002I: Partitionsauslastung vor dem Backup: Belegt: %s Frei: %s
10-21-2018 09:44:42 --- RBK1003I: Partitionsauslastung nach dem Backup: Belegt: %s Frei: %s
10-21-2018 09:44:42 --- RBK1004I: Änderung freier Platz: %s (%s %)

I saw the Issue you opened for the Upgrade Process. Good Luck on that task 👍

@framps

This comment has been minimized.

Copy link
Owner

framps commented Oct 21, 2018

Thank you very much for verifying even it failed. I though it's a low hanging fruit. Will check the code now in detail.

@pchristod

This comment has been minimized.

Copy link
Author

pchristod commented Oct 21, 2018

Thank you very much. Take your time, I know it's low priority because they are just samples. However I find them quite handy to see the free space :) So thanks for keeping them alive.
I'll receive updates on this Issue so I will test again if there's something to test!

@framps framps added fixed and removed to be verified fixed labels Oct 23, 2018

@framps

This comment has been minimized.

Copy link
Owner

framps commented Oct 23, 2018

@pchristod Is fixed now 😃

@pchristod

This comment has been minimized.

Copy link
Author

pchristod commented Oct 23, 2018

Thanks, just downloaded them, applied Permissions and tested. Everythin is fixed now. Output is now correct :)

10-23-2018 20:41:05 --- RBK0085I: Backuperstellung vom Typ rsync gestartet. Bitte Geduld.
10-23-2018 20:41:06 --- RBK1000I: CPU Temperatur vor und nach dem Backup: 43.3'C - 43.3'C
10-23-2018 20:41:06 --- RBK1001I: Speicherauslastung - Vor dem Backup - Belegt:  MB Frei:  MB - Nach dem Backup: Belegt:  MB Frei:  MB
10-23-2018 20:41:07 --- RBK1002I: Partitionsauslastung vor dem Backup: Belegt: 14.32 GiB Frei: 13.39 GiB
10-23-2018 20:41:07 --- RBK1003I: Partitionsauslastung nach dem Backup: Belegt: 14.32 GiB Frei: 13.39 GiB
10-23-2018 20:41:07 --- RBK1004I: Änderung freier Platz: 0 Bytes (0.00 )
@framps

This comment has been minimized.

Copy link
Owner

framps commented Oct 23, 2018

Memory utilization field is empty 😢 .

I just detected the format for free command depends on the raspbian version. I tested the extension on Wheezy but on Stretch I get the same empty result as you. I just changed the extension to work on Stretch 😃

@pchristod

This comment has been minimized.

Copy link
Author

pchristod commented Oct 23, 2018

Ah damn, didn't even see it. It was quite a long day. Used the latest files and checked again. Now everything is as it should be :)

10-23-2018 22:13:36 --- RBK0085I: Backuperstellung vom Typ rsync gestartet. Bitte Geduld.
10-23-2018 22:13:36 --- RBK1000I: CPU Temperatur vor und nach dem Backup: 44.4'C - 44.4'C
10-23-2018 22:13:36 --- RBK1001I: Speicherauslastung - Vor dem Backup - Belegt: 939 MB Frei: 206 MB - Nach dem Backup: Belegt: 939 MB Frei: 206 MB
10-23-2018 22:13:37 --- RBK1002I: Partitionsauslastung vor dem Backup: Belegt: 14.32 GiB Frei: 13.39 GiB
10-23-2018 22:13:37 --- RBK1003I: Partitionsauslastung nach dem Backup: Belegt: 14.32 GiB Frei: 13.39 GiB
10-23-2018 22:13:37 --- RBK1004I: Änderung freier Platz: 0 Bytes (0.00 )
@framps

This comment has been minimized.

Copy link
Owner

framps commented Oct 24, 2018

Great. Thank you very much for verifying.
Actually you revealed 3 issues I fixed now:

  1. Incorrect message format in extensions
  2. Free memory detection does not work in
    On stretch
  3. Free disk detection does not work if backup space is a mounted nfs drive
@hillebr

This comment has been minimized.

Copy link

hillebr commented Oct 25, 2018

Hi framp,
I just tried to fix the issue with empty MEM messages with (free -m | grep "Mem" | cut -b 20-) when I read that you`ve already fixed it with (free -m | grep "Mem:" | awk '{print $2,$3}')
But: Shouldn't it be (free -m | grep "Mem:" | awk '{print $3,$4}') if your message is Used: %1 MB Free: %2 MB?

I think $2 is total, $3 is used and $4 is free mem?!

@framps

This comment has been minimized.

Copy link
Owner

framps commented Oct 25, 2018

Hello hillebr,

good catch 👍 You are right. I updated the retrieval of used and free memory in the extension just now and also eliminated the awk usage just to extract values. There is a plain bash way available to get this done 😃

@framps framps closed this Jan 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment