1 (edited by ciprian87 2020-06-21 20:04:10)

Topic: How to create a real full backup/restore (with Postgres)

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.2.1 PGSQL edition.
- Deployed with iRedMail Easy or the downloadable installer: downloadable installer
- Linux/BSD distribution name and version: Ubuntu 18.94
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- 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.
====

Hi there,

What I'd like to do:
- I have iRedMail installed (with SOGo, no Roundcube) on a VPS and I'd like to be able to create a full backup as DR.

What I Backup:
- I runned the scripts from crontab to backup sogo and psql
- I archived the folder /var/vmail/vmail1

How I tried to restore:
- Install iRedMail on a fresh VPS
- copy vmail1 archive to /var/vmail/vmail1 (with right permissions - 0700 and vmail user)
- go to postgres user with: su postgres and restore the sql files from psql archive (psql -U postgres < file.sql)
- unarhive sogo and run sogo-tool commands

Where I have issues:
- My users are not restored (I have only postmaster user)
- sogo-tool is giving me errors that the user that I'm trying to restore is not existing

What should I do to be able to complete this full restore?

Regards,
Ciprian

----

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

2

Re: How to create a real full backup/restore (with Postgres)

Anyone ? this seems to be old: https://docs.iredmail.org/migrate.to.ne … erver.html :-(

3 (edited by ciprian87 2020-06-23 02:17:47)

Re: How to create a real full backup/restore (with Postgres)

No one? :-( with some ideas?

Where I can find: Please replace <vmail_user_password> by the real password for SQL user vmail.

where it is store vmail password
?

LE: Founded ... in /opt/iredadp/settings.py

The restore was a success now..

4 (edited by MuPp3t33r 2020-06-23 19:13:14)

Re: How to create a real full backup/restore (with Postgres)

Passwords are also stored at /root/.my.cnf-*
Edit: oops, I'm MySQL, not PostGres. lol

5

Re: How to create a real full backup/restore (with Postgres)

ciprian87 wrote:

where it is store vmail password

It's stored in file ~/.pgpass under PostgreSQL daemon user's HOME directory.