[GH-ISSUE #133] Issue while trying to restore mails #104

Closed
opened 2026-02-27 08:14:22 +03:00 by kerem · 2 comments
Owner

Originally created by @dZZZr on GitHub (Jul 11, 2019).
Original GitHub issue: https://github.com/lucascbeyeler/zmbackup/issues/133

Originally assigned to: @lucascbeyeler on GitHub.

ISSUE TYPE
  • Bug Report
ENVIRONMENT VERSION
  • Zmbackup Version: 1.2.3
  • Zimbra Version: 8.8.12
  • Linux Distribution & Version: Ubuntu 18.04.2
SUMMARY
STEPS TO REPRODUCE

zmbackup -f -d domain.pl
zmbackup -r -ldp full-20190711115424 info@domain.pl
zmbackup -r -m full-20190711115424 info@domain.pl

ACTUAL RESULTS

Restore mail process with session full-20190711115424 started at Thu Jul 11 12:32:22 CEST 2019Error during the restore process for account info@domain.pl. Error message below:info@domain.pl:
http: error: ConnectionError: ('Connection aborted.', timeout('The write operation timed out',)) while doing POST request to URL: https://192.168.1.215:7071/home/info@domain.pl/?fmt=tgz
Restore mail process with session full-20190711115424 completed at Thu Jul 11 12:32:54 CEST 2019

First, thanks for Your great work.

The issue occurs when restoring the mailbox. Zmbackup can restore some mails but at some point error occurs. It may be associated with polish national characters in mail title/file name.

I attached mailbox.log where You can find the error message:

2019-07-11 12:32:55,457 WARN [qtp1258084361-525:https:https://192.168.1.215:7071/home/info@domain.pl/?fmt=tgz] [name=zmbackup@somewhere.pl;mid=297;ip=192.168.1.215;port=48034;] misc - ArchiveFormatter addError:Early EOF: p
ath=Inbox/0000000468-Fwd_ rozliczenie pażdziernik.eml
com.zimbra.cs.service.formatter.FormatterServiceException: Early EOF
ExceptionId:qtp1258084361-525:https:https://192.168.1.215:7071/home/info@domain.pl/?fmt=tgz:1562841175457:aeaea4bb9b567bf4

When I'm using zmmailbox everything is OK.
zmmailbox -z -m info@domain.pl postRestURL "//?fmt=tgz&resolve=skip" /opt/zimbra/backup/full-20190711115424/info@domain.pl.tgz

Best regards,
mailbox.log

Originally created by @dZZZr on GitHub (Jul 11, 2019). Original GitHub issue: https://github.com/lucascbeyeler/zmbackup/issues/133 Originally assigned to: @lucascbeyeler on GitHub. <!-- Before open an issue, please remember to check our Google Group (link in README.md) and the other issues. Maybe what you want is already answered. You don't need to answer all the questions below, just answer what is pertinent to what you want (You don't need to explain the steps to reproduce and the results if your issue is about the documentation) --> <!-- ISSUE TYPE: Inform what kind of issue we are talking about. Choose only one option. --> ##### ISSUE TYPE - Bug Report <!-- ENVIRONMENT VERSION: Describe the environment you are using the Zmbackup and its version. --> ##### ENVIRONMENT VERSION - Zmbackup Version: 1.2.3 - Zimbra Version: 8.8.12 - Linux Distribution & Version: Ubuntu 18.04.2 <!-- SUMMARY: Describe your issue in this field. The more detailed you gave us, more easy and fast will be for us to debug and fix the software. --> ##### SUMMARY <!--- SUMMARY:For bugs, show exactly how to reproduce the problem, using a minimal test-case. For new features, show how the feature would be used. --> ##### STEPS TO REPRODUCE zmbackup -f -d domain.pl zmbackup -r -ldp full-20190711115424 info@domain.pl zmbackup -r -m full-20190711115424 info@domain.pl <!-- ACTUAL RESULTS: What happened when you did the steps before. --> ##### ACTUAL RESULTS Restore mail process with session full-20190711115424 started at Thu Jul 11 12:32:22 CEST 2019Error during the restore process for account info@domain.pl. Error message below:info@domain.pl: http: error: ConnectionError: ('Connection aborted.', timeout('The write operation timed out',)) while doing POST request to URL: https://192.168.1.215:7071/home/info@domain.pl/?fmt=tgz Restore mail process with session full-20190711115424 completed at Thu Jul 11 12:32:54 CEST 2019 First, thanks for Your great work. The issue occurs when restoring the mailbox. Zmbackup can restore some mails but at some point error occurs. It may be associated with polish national characters in mail title/file name. I attached mailbox.log where You can find the error message: 2019-07-11 12:32:55,457 WARN [qtp1258084361-525:https:https://192.168.1.215:7071/home/info@domain.pl/?fmt=tgz] [name=zmbackup@somewhere.pl;mid=297;ip=192.168.1.215;port=48034;] misc - ArchiveFormatter addError:Early EOF: p ath=Inbox/0000000468-Fwd_ rozliczenie pażdziernik.eml com.zimbra.cs.service.formatter.FormatterServiceException: Early EOF ExceptionId:qtp1258084361-525:https:https://192.168.1.215:7071/home/info@domain.pl/?fmt=tgz:1562841175457:aeaea4bb9b567bf4 When I'm using zmmailbox everything is OK. zmmailbox -z -m info@domain.pl postRestURL "//?fmt=tgz&resolve=skip" /opt/zimbra/backup/full-20190711115424/info@domain.pl.tgz Best regards, [mailbox.log](https://github.com/Zmbackup/zmbackup/files/3381752/mailbox.log)
kerem 2026-02-27 08:14:22 +03:00
Author
Owner

@ananiasfilho commented on GitHub (Jul 28, 2019):

The problem seems be python httpie timeout:
check this file:
if parallel (multiples restore)
github.com/Zmbackup/zmbackup@d83ab3efbc/project/lib/bash/ParallelAction.sh (L91)

if single account
github.com/Zmbackup/zmbackup@d83ab3efbc/project/lib/bash/RestoreAction.sh (L24)

both files have this line on restore funcion:

ERR=$((http --check-status --verify=no POST "$WEBPROTO://$MAILHOST:7071/home/$2/?fmt=tgz"\

try change it to

ERR=$((http --check-status --timeout 600 --verify=no POST "$WEBPROTO://$MAILHOST:7071/home/$2/?fmt=tgz"\

the option --timeout 600 (is to set timeout to 600s/10minute) if timeout continue, try a high value like 1800 (30 minutes) if backup size is big like 20-30 GB.

Please, give us a feedback about it!

<!-- gh-comment-id:515723965 --> @ananiasfilho commented on GitHub (Jul 28, 2019): The problem seems be python httpie timeout: check this file: **if parallel (multiples restore)** https://github.com/Zmbackup/zmbackup/blob/d83ab3efbc53d8ef5b20a2742da3fc2661841bb7/project/lib/bash/ParallelAction.sh#L91 **if single account** https://github.com/Zmbackup/zmbackup/blob/d83ab3efbc53d8ef5b20a2742da3fc2661841bb7/project/lib/bash/RestoreAction.sh#L24 both files have this line on restore funcion: ERR=$((http --check-status --verify=no POST "$WEBPROTO://$MAILHOST:7071/home/$2/?fmt=tgz"\ try change it to ERR=$((http --check-status --timeout 600 --verify=no POST "$WEBPROTO://$MAILHOST:7071/home/$2/?fmt=tgz"\ the option --timeout 600 (is to set timeout to 600s/10minute) if timeout continue, try a high value like 1800 (30 minutes) if backup size is big like 20-30 GB. Please, give us a feedback about it!
Author
Owner

@lucascbeyeler commented on GitHub (Dec 8, 2020):

Fixed - dropped httpie in favor of cURL

<!-- gh-comment-id:740650036 --> @lucascbeyeler commented on GitHub (Dec 8, 2020): Fixed - dropped httpie in favor of cURL
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/zmbackup#104
No description provided.