Topic: iRedMail periodic archive plan
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.7.1
- Deployed with iRedMail Easy or the downloadable installer? installer
- Linux/BSD distribution name and version: Ubuntu 24.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Dear colleagues!
Please give me advice on backup of the iRedMail mail server.
The server is hosted at VPS with a 250GB disk. Stored emails: ~180000, ~150GB total. It serves 2 domains, with few mail users (~10 at each domain).
PostgreSQL database, Nginx+SOGO.
I plan to buy additional data storage at the same hoster and once a week make mostly full backup of needed databases and /var/vmail/vmail1 srorage.
If I accidently loose my server, I plan to reinstall it and restore data from external storage, I suppose week age of archive will fit.
Hoster offers sftp (and rsync?) access to external storage.
1. What are the necessary objects of backup?
- ~/iRedMail-1.7.1/config (contains passwords, hashes of passwords, settings needed for new install of iRedMail)
- PGSQL databases (maybe using original script /var/vmail/backup/backup_pgsql.sh):
vmail amavisd iredadmin sogo iredapd
- mail storage: /var/vmail/vmail1
- ...something else?
2. What is the best mechanism of backup?
- mount storage to iRedMail filesystem (/mnt/backup/) using sshfs command
and then make tar - archive like:
tar -czvf /mnt/backup/vmail.tar.gz /var/vmail/vmail1
- use rsync instead?
I am afraid of overquoting iRedMail storage, since mail is ~150GB, and free space is ~100GB - mwybe some temporary files will full storage of iRedMail file system?
3. I plan to make live-backup (not stopping services) - is this safe?
loss of few messages is not critical )
Thank you for any advice, and welcome to post some examples, if you please.
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.