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
Backup status error after update to v22 #1132
Comments
Could you run |
Exactly same problem here. Running ./backup.py status gives same error:
|
First thing that comes to mind is this line here: https://github.com/mail-in-a-box/mailinabox/blob/master/management/backup.py#L121 We check incremental_count, but not incremental_size. So if that's zero it will fail. We could add a check for that here |
Could you test this branch in my repo? https://github.com/yodax/mailinabox/tree/backupfix |
Just copied your backup.py to my /management folder and ran ./backup.py status
The Backup Tab shows same error: "float division by zero" |
I can confirm this issue shows up as well after upgrading to v22. |
Putting in the file isn't enough for the site. You need to run the setup of the management interface. |
Ok it seems that the underlying problem is that the incremental file size isn't calculated properly. What backup type are you using? |
I´m using rsync to backup the files to my second vserver. Do you think disable backup - save all backups to my local PC - and enable the backup function would work? |
Could you run this bit manually and post the output?
From bash it would be
Where remote:/path is the destination host. |
Wrong syntax:
Running without that command gives:
|
This needs to go as well: -o StrictHostKeyChecking=no |
Paging @guyzmo, could you have a look at this? @JoshData this branch handles the error more gracefully but doesn't offer a in-depth fix. I think it is wise to included so it will never divide by zero again. What do you think? The diff:
|
+1 |
Can anyone else try and run the command line? It's crashing because we can't parse the output. Since I don't have access to a box with the error I can't reproduce the problem without that information. |
Something like that, then? |
No I think I made a mistake, thanks for trying though! Could you try this:
|
Thats more like it!
|
yes same here:
Sorry for that late reply |
Yes, I can. But it just tells "float division by zero" as well :(..
Nothing else. I'd guess it is some time-out-problem, because MIAB needs
to connect to my local NAS, which might take some time. But before the
update it worked regardless of the delay.
time sudo ./backup.py
float division by zero
real 0m14.884s
user 0m0.291s
sys 0m0.081s
…On Mon, Apr 3, 2017 at 10:18 AM, Michael Kroes ***@***.***> wrote:
Could you run management/backup.py status from the cli?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Thanks for the results. I have tested the regex on those results and that should work. I don't see anything that is obviously wrong or release related. This will need some more digging. I need to think about this some more. |
Late to the party, but as the others (except for ma0ho), the rsync-command works :) |
I'll check this evening ;)
…On Tue, Apr 4, 2017 at 6:07 PM, David ***@***.***> wrote:
Late to the party, but as the others (except for ma0ho), the
rsync-command works :)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
All three of my upgraded instances to .22 are failing with the same " invalid literal for int() with base 10: 'WARNING:' " error when trying to backup to the rsync share. Heck even trying to browse to the backup tab in the web admin the same error is thrown. |
I've setup a test environment and created an rsync backup to another machine. Everything works. When I run the results posted here through the regex, all is fine. No changes have been made to the code in the .22 release. I'm not sure what else I can try to reproduce this. |
@yodax |
It was an upgraded install. It previously had rsync on it. It was reconfigured after .22 was released. |
Ok, had to ask as it wasn't clear :) Well, i managed to fix my miab. Ran I ran the upgrade for 0.22 again before that if that is a clue. |
Worked for me too @durd - no error while running |
@tynie Nope, ive got "Size" and "Deleted in...". |
@tynie I'm not sure how fast your uplink is or how large the dataset, but 2 minutes for the backup seems fast. @durd could you run this command as well so we can see if there is a difference?
|
I erased all files on my backupserver and waited overnight for the backup to run again. The backup seems to work but in the gui it shows this result: If i run the command i'l get this result:
|
@yodax My backup is about 100MB and bandwidth is about 200Mbit/s so i think that is realistic. |
I also deleted the backup files and waited overnight. I see the same
result as @azzeman.
|
@yodax I mentioned this in an earlier comment, but yes, the command works. All: I realize this is a bit late, I should have mentioned this earlier. |
I suspected it would work. The command is used to calculate the file size and the backups present. So I wanted to compare a "failed" listing with a "working" listing. On my test machine it did count the size. |
No problem, let me know if you want me to try anything else. I'll still be following this issue. |
And on day 2- i'm back on the "float division by zero"-error again. |
@azzeman same here |
Same for me :-(
Am 7. Apr. 2017, 12:15, um 12:15, tynie <notifications@github.com> schrieb:
…@azzeman same here
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#1132 (comment)
|
Would somebody be so kind and rerun the setup for me? I'm suspecting an upstream issue. Also to explain the silence. I've been busy but I suspect I can reproduce this maybe tomorrow. |
I have just been running the setup again (with the same result) - do you want me to look for something special? |
If it still fails it didn't help. I'm still unable to reproduce it. My testbox is happily using rsync backup for two days now. If prepared a new version of backup.py on gist. It contains a few print statements. [deleted gist] Could someone backup there original backup.py and replace it with this one. Then run:
And post the output here. (If you want you can sanitise the hostname etc, I care about the file sizes and the parsed lines) |
|
@azzeman thanks! Can you check if you have a / at the end of the path in the UI? I do and if I remove it I get the same error as you do. |
I've fixed it on my test machine when I was able to reproduce it. I've created a PR for it here. If anyone would care to test if it also fixes it for you, that would be great and much appreciated! |
Ah! It works when i have an ending / Great work! |
Works! Thank you! |
Works!
…On Mon, Apr 10, 2017 at 7:08 PM, tynie ***@***.***> wrote:
Works! Thank you!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I had the issue as well and can confirm that the given backup.py in the PR fixed it for me as well. Thanks! My installation was a brand new v22 install btw. It started happening after the first incremental backup had finished. |
I've merged the PR so I'm closing this issue. Thanks all. |
I'm using rsync backup to my personal NAS. Unfortunately, after updating to v22, I see a "float division by zero" error on opening the backup status page. I seems to happen while the list of backups is loaded. This list actually isn't displayed anymore. I receive the same error as part of the nightly backup status mail.
Maybe I can do some more investigation later this week..
The text was updated successfully, but these errors were encountered: