1

Topic: sogo-tool not found (sogo backup)

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.7
- Linux/BSD distribution name and version: FreeBSD 11
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MySQL
- Web server (Apache or Nginx):nginx
- Manage mail accounts with iRedAdmin-Pro? no
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Sorry for multiple posts, though I feel it better to have them separated due to having the right topic for search engines.

root@mail:/var/vmail/backup # bash backup_sogo.sh
* Backup all users' data under /var/vmail/backup/sogo/2017/10/17
backup_sogo.sh: line 99: sogo-tool: command not found


the tool is stored in
/usr/local/GNUstep/Local/Tools/Admin/sogo-tool
and the backup script expects sogo-tool to be in path
(line 63 - export CMD_SOGO_TOOL='sogo-tool')

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: sogo-tool not found (sogo backup)

Please either use absolute path or add one line at the beginning of the script:

export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/GNUstep/Local/Tools/Admin:$PATH

3

Re: sogo-tool not found (sogo backup)

ZhangHuangbin wrote:

Please either use absolute path or add one line at the beginning of the script:

export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/GNUstep/Local/Tools/Admin:$PATH

Thanks I just entered the full path to the script, it was more meant as a bug report/help people with same problem

cheers :-)

4

Re: sogo-tool not found (sogo backup)

This fix will be mentioned in iRedMail upgrade tutorial for next release.

DRAFT upgrade tutorial is available here:
http://www.iredmail.org/docs/upgrade.ir … s-3-issues

5

Re: sogo-tool not found (sogo backup)

ZhangHuangbin wrote:

This fix will be mentioned in iRedMail upgrade tutorial for next release.

DRAFT upgrade tutorial is available here:
http://www.iredmail.org/docs/upgrade.ir … s-3-issues

Awesome! Thank you!

6

Re: sogo-tool not found (sogo backup)

Another quick update. I applied your fix but the error are still there.
I can reproduce the bug now.

Basicly whenever an user logs into SOGo the user is recognized and the backup is done correctly. So after I logged in with every testuser the backup runs perfectly. But when I run the backup again after 300 seconds (cache clearing time) it shows me again that all users are unknown.
That's why it showed me each night that the backup is empty.

Any idea what this could be? I didn't change anything apart from your basic configuration and the %d domain fix for the adressbooks.

I guess it's not intended that SOGo loses the accounts after the cache is cleaned?

Really sorry for bothering you!

7

Re: sogo-tool not found (sogo backup)

Another  update.

I posted it onto the official SOGo plattform, here is their response:

https://sogo.nu/bugs/view.php?id=4723

Looks like for the nearer future it will be impossible to create backups with an domain-placeholder.

8

Re: sogo-tool not found (sogo backup)

Sad, please help push them because the %d placeholder in ldap baseDN is sponsored by iRedMail team, we paid for this feature, and we hope they fix this issue.

9

Re: sogo-tool not found (sogo backup)

Oh really? I didn't knew that. Well for me it would be  also an important feature to have the %d  placeholder but no backups is also no solution. But since now every iRedMail users seems to have that  issue, I hope the SOGo team will have an urge to fix that.

10

Re: sogo-tool not found (sogo backup)

jeouz wrote:

Oh really? I didn't knew that. Well for me it would be  also an important feature to have the %d  placeholder but no backups is also no solution. But since now every iRedMail users seems to have that  issue, I hope the SOGo team will have an urge to fix that.

I GUESS no one but iRedMail users need this feature (for better ldap query performance, better restrictions - especially for ldap address book), so I don't think SOGo team will consider it as an important feature.

I requested this placeholder feature 2+ years ago, until i contacted them (again) this year for paid support:
https://sogo.nu/bugs/view.php?id=3685

So, help yourself, and help other iRedMail users, leave your comments in the SOGo issue tracker below to let them know we really want it implemented. But again, they deliver SOGo for free, we can only hope or pay, no way to force them. smile
https://sogo.nu/bugs/view.php?id=4723

11

Re: sogo-tool not found (sogo backup)

Yeah I totally understand that. As you can see I even wrote an work around but that wasn't working as intended.
Basicly If someone tells me how to fix it, I can write an script but right now the only way to solve this would be removing the cache cleanup interval or writing an script that logs in with every user, does the backup and then resets the interval to 300seconds. But I think that is more an hacky way and not how it should run on a productive system.

Other then that there could be a way to store the cache/users manually and adapt the backup script but right now I'm fishing in the dark.

I will support the issue and try to push it, I even would invest some money if that helps.

12

Re: sogo-tool not found (sogo backup)

- Alternative solution is: backup sogo by SQL backup (like "mysqldump sogo").
- We need to push SOGo team to implement this, and we also paid for the placeholder feature. i just didn't know that the sogo-tool backup is involved. sad

13

Re: sogo-tool not found (sogo backup)

Yeah that could work, I gonna test it today.

I'm glad we found this bug, even if they don't seem to have much ambitions to fix it. But if you even paid for the placeholder I guess it should be done since it's directly related to the placeholder feature.
Anyways if you see any way I can help you just tell me. Otherwise I will try to push them smile

14

Re: sogo-tool not found (sogo backup)

I have no idea because we must update SOGo source code, it's out of my control. Help push SOGo team if possible.

15

Re: sogo-tool not found (sogo backup)

Hey,

long  time no seen! Just an quick question. Since May this seems to be fixxed (see https://sogo.nu/bugs/view.php?id=4723 ).
Did you already to manage to get it work?

Would love to test it out and use it in production.

Thanks in forward.

jeouz

16

Re: sogo-tool not found (sogo backup)

hi Jeouz,

Yes it should work as expected.

17 (edited by jeouz 2019-09-12 03:05:13)

Re: sogo-tool not found (sogo backup)

Awesome, thanks it's working!

Thank you for your time and kindness smile