1 (edited by gilles.quenot 2019-04-08 23:37:37)

Topic: Can't restore sogo iredmail backup (calendar and contacts)

- iRedMail 0.9.9
- Linux debian9
- Store mail accounts in MariaDB
- Web server Nginx
====

Hi,

As seen in this thread, I reinstalled iredmail.

Now I would like to restore contacts and calendar, so :

cd /var/vmail/backup/sogo/2019/04
tar xjvf 07.tar.bz2
sogo-tool restore 07 gilles.quenot@domain.tld
2019-04-08 17:20:18.904 sogo-tool[8281:8281] missing 'mode' parameter
<0x0xc8be90[SOGoCache]> Cache cleanup interval set every 300.000000 seconds
<0x0xc8be90[SOGoCache]> Using host(s) '127.0.0.1' as server(s)
2019-04-08 17:20:25.055 sogo-tool[8281:8281] no user table '/Users/gilles.quenot@domain.tld/(null)' found

Don't know how to restore properly, tried many ways from sogo-tool restore --help
Does I need to restore only the latest file or each files ?

I will update the script from the linked post with the solution.

Regards

----

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

2

Re: Can't restore sogo iredmail backup (calendar and contacts)

FYI: http://wiki.sogo.nu/backupRestore

- If you have backup file generated with "mysqldump" (raw SQL file), it will be easier to restore this SQL file directly.
- If you have to restore with 'sogo-tool', you need to restore same file with "-p" first, then "-f". Restoring with sogo-tool really confuses people. if mail users have sieve rules, you need to restore with '-c /path/to/sieve.cred' (/etc/sogo/sieve.cred on iRedMail by default).

3 (edited by gilles.quenot 2019-04-11 04:40:00)

Re: Can't restore sogo iredmail backup (calendar and contacts)

I would like to restore /var/vmail/backup/backup_sogo.sh backups

Files are like this in /var/vmail/backup/sogo

[...]
2019/04/02.tar.bz2
2019/04/03.tar.bz2
2019/04/09.tar.bz2

The doc you linked is not really complete and it's not clear what to do IMHO.

- first tar xjvf *.bz2
- sogo-tool ...

Does we need to restore all files (all files differs ?) or just one backup file (new file contains old files)

4

Re: Can't restore sogo iredmail backup (calendar and contacts)

Was too tired to find the solution.

Simply :

tar xjvf 07.tar.bz2
restore -p ./07 gilles.quenot@domain.tld
restore -f ALL ./07 gilles.quenot@domain.tld

Thanks