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

restoring issue #155

Open
killmasta93 opened this issue Jan 16, 2021 · 23 comments
Open

restoring issue #155

killmasta93 opened this issue Jan 16, 2021 · 23 comments

Comments

@killmasta93
Copy link

killmasta93 commented Jan 16, 2021

Hi
currently trying to restore a full backup but it says restore completed but does not restore

zimbra@mail:/root$ zmbackup -l
+---------------------------+------------+----------+----------------------------+
|       Session Name        |    Date    |   Size   |        Description         |
+---------------------------+------------+----------+----------------------------+
| alias-20210110003005      | 01/10/2021 | 5.0M     | Alias Backup               |
| alias-20210111003014      | 01/11/2021 | 5.0M     | Alias Backup               |
| alias-20210112003002      | 01/12/2021 | 5.0M     | Alias Backup               |
| alias-20210113003006      | 01/13/2021 | 5.0M     | Alias Backup               |
| alias-20210114003008      | 01/14/2021 | 5.0M     | Alias Backup               |
| alias-20210115003003      | 01/15/2021 | 5.0M     | Alias Backup               |
| alias-20210116003011      | 01/16/2021 | 5.0M     | Alias Backup               |
| full-20210109121427       | 01/09/2021 | 6.9G     | Full Backup                |
| full-20210110013003       | 01/10/2021 | 6.9G     | Full Backup                |
| inc-20210111013006        | 01/11/2021 | 21M      | Incremental Backup         |
| inc-20210112013006        | 01/12/2021 | 19M      | Incremental Backup         |
| inc-20210113013001        | 01/13/2021 | 71M      | Incremental Backup         |
| inc-20210114013002        | 01/14/2021 | 38M      | Incremental Backup         |
| inc-20210115013008        | 01/15/2021 | 37M      | Incremental Backup         |
| inc-20210116013012        | 01/16/2021 | 69M      | Incremental Backup         |
+---------------------------+------------+----------+----------------------------+
zimbra@mail:/root$ zmbackup -r -m  full-20210110013003  sistemas@mydomain.com
Restore mail process with session full-20210110013003 started at Sat Jan 16 12:09:25 -05 2021
Restore mail process with session full-20210110013003 completed at Sat Jan 16 12:09:25 -05 2021

image

Then i tried to restore with this option but screwd my zimbra server, i had to restore from backup


zimbra@mail:/root$ zmbackup -r  full-20210110013003  sistemas@mydomain.com
Restore LDAP process with session full-20210110013003 started at Sat Jan 16 12:16:00 -05 2021

Error during the restore process for account n/gin/gteman/g@mydomain. Error message below:
n/gin/gteman/g@mydomain.com: /mnt/full-20210110013003/n/gin/gteman/g@mydomain.ldiff: No such file or directorygrep: /mnt/full-20210110013003/n/gin/gteman/g@mydomain.ldiff: No such file or directory
awk: cmd. line:1: print $2
awk: cmd. line:1: ^ syntax error
Restore LDAP process with session full-20210110013003 completed at Sat Jan 16 12:16:00 -05 2021
Restore mail process with session full-20210110013003 started at Sat Jan 16 12:16:00 -05 2021
Restore mail process with session full-20210110013003 completed at Sat Jan 16 12:16:01 -05 2021

@lucascbeyeler
Copy link
Owner

Hi, which version?

@killmasta93
Copy link
Author

thanks for the reply running 1.2.5

@lucascbeyeler
Copy link
Owner

lucascbeyeler commented Jan 18, 2021

That's probably Zimbra - their API is broken for backing and restoring data for a long time.

@killmasta93
Copy link
Author

killmasta93 commented Jan 18, 2021

thanks for the reply, so im able to restoring running this command

su - zimbra -c "zmmailbox -z -m sistemas@mydomain.com postRestURL '//?fmt=tgz&resolve=skip' /mnt/full-20210110013003/sistemas@mydomain.com.tgz";

@lucascbeyeler
Copy link
Owner

possible - give it a try. Worst case scenario I change the code to use this CLI command instead

@killmasta93
Copy link
Author

so the above command works to restore, but the zmbackup command line does not

@HcKTR
Copy link

HcKTR commented Jan 19, 2021

Hello, thank you for your return. I haven't tried it yet. I took note of this command.

@killmasta93
Copy link
Author

yeah thats why for now only restoring mailbox using the command, waiting till the new update to fix this issue

su - zimbra -c "zmmailbox -z -m sistemas@mydomain.com postRestURL '//?fmt=tgz&resolve=skip' /mnt/full-20210110013003/sistemas@mydomain.com.tgz";

@lucascbeyeler
Copy link
Owner

Hi,

I did not release yet a new version but for the latest commit I'm using zmmailbox. Could you please try again with that version and see if the problem persists?

Repository owner deleted a comment from EgemenErol Feb 6, 2021
@killmasta93
Copy link
Author

thanks for the reply, should i update it? and retry this command?
zimbra@mail:/root$ zmbackup -r -m full-20210110013003 sistemas@mydomain.com

@lucascbeyeler
Copy link
Owner

yes, please

@killmasta93
Copy link
Author

so i tried the following updated to 1.2.6 and restored another mailbox but i got this

zimbra@mail:/root/zmbackup$ zmbackup -r -m /mnt/full-20210207013003 contabilidad@mydomain.com
Nothing to do. Closing...

i checked the size


-rwxr-xr-x 1 zimbra zimbra 1.1K Feb  7 01:30 contabilidad@mydomain.ldiff
-rwxr-xr-x 1 zimbra zimbra  72M Feb  7 01:31 contabilidad@mydomain.tgz

Thank you

@lucascbeyeler
Copy link
Owner

zimbra@mail:/root/zmbackup$ zmbackup -r -m full-20210207013003 contabilidad@mydomain.com

@lucascbeyeler lucascbeyeler reopened this Feb 10, 2021
@lucascbeyeler
Copy link
Owner

Closing the ticket because of inactivity - if the problem persists please feel free to reopen.

@killmasta93
Copy link
Author

thanks for the reply, and sorry for the late reply, so i retied and got this error

zimbra@mail:/mnt$ zmbackup -r -m inc-20210315013001 contabilidad@mydomain.com
Restore mail process with session inc-20210315013001 started at Tue Mar 16 22:08:05 -05 2021Error during the restore process for account contabilidad@tixx/xx.com.co. Error message below:
contabilidad@tixx/xx.com.co: ERROR: account.NO_SUCH_ACCOUNT (no such account: contabilidad@tixx/xx.com.co)

Restore mail process with session inc-20210315013001 completed at Tue Mar 16 22:08:17 -05 2021

@lucascbeyeler lucascbeyeler reopened this Apr 4, 2021
@lucascbeyeler
Copy link
Owner

You are using -m option for an account that does not exist. That´s the issue

@killmasta93
Copy link
Author

Thanks for the reply. it says the account does not exist but it does, i tried another account to see what happens, whats odd is that not sure why it shows like n/gky

zimbra@mail:/mnt$ zmbackup -r -m inc-20210403013002 sky@mydomain.com.co
Restore mail process with session inc-20210403013002 started at Sun Apr  4 17:53:50 -05 2021Error during the restore process for account n/gky@txxx/gcue.com.co. Error message below:
n/gky@tiren/gcue.com.co: ERROR: account.NO_SUCH_ACCOUNT (no such account: n/gky@txxx/gcue.com.co)

Restore mail process with session inc-20210403013002 completed at Sun Apr  4 17:54:00 -05 2021

-rwxr-xr-x 1 zimbra zimbra 1.3K Apr 3 01:34 sky@mydomain.com.co.tgz

Thank you

@lucascbeyeler
Copy link
Owner

lucascbeyeler commented Apr 5, 2021

I mean not the file, I mean the account inside zimbra server... -m is just to restore the e-mails and nothing more. And that´s not Zmbackup error - that´s your mailserver error

@killmasta93
Copy link
Author

thanks for the reply, but the account sky@mydomain.com.co does exist

image

@wh4u
Copy link

wh4u commented Apr 14, 2021

The same behavior occurred to me also

@killmasta93
Copy link
Author

any updates?

@killmasta93
Copy link
Author

bump?

@tofuSCHNITZEL
Copy link

zimbra@mail:/root$ zmbackup -r full-20210110013003 sistemas@mydomain.com
Restore LDAP process with session full-20210110013003 started at Sat Jan 16 12:16:00 -05 2021

Error during the restore process for account n/gin/gteman/g@mydomain. Error message below:
n/gin/gteman/g@mydomain.com: /mnt/full-20210110013003/n/gin/gteman/g@mydomain.ldiff: No such file or directorygrep: /mnt/full-20210110013003/n/gin/gteman/g@mydomain.ldiff: No such file or directory
awk: cmd. line:1: print $2
awk: cmd. line:1: ^ syntax error
Restore LDAP process with session full-20210110013003 completed at Sat Jan 16 12:16:00 -05 2021
Restore mail process with session full-20210110013003 started at Sat Jan 16 12:16:00 -05 2021
Restore mail process with session full-20210110013003 completed at Sat Jan 16 12:16:01 -05 2021

this is fixed here:
tofuSCHNITZEL@d502834
the bash replacement was not working as intended

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

No branches or pull requests

5 participants