Topic: Backup Best Practices
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.1
- Deployed with iRedMail Easy or the downloadable installer? Installer
- Linux/BSD distribution name and version: CentOS 8 Basic
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- 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.
I am experimenting with backup and restore procedures.
The FAQ page on backups says: "... you can backup mailboxes with tool like rsync or other backup tools. ... Folder /var/vmail/vmail1 must be owned by user vmail, group vmail, permission 0700."
As rsync cares about owner and permissions, and not really being a Linux person, I'm wondering which of these options would be best vis-a-vis the source and destination systems:
1. Back everything up as root on both machines, and reset ownership and permissions (to user vmail) only after an eventual restore operation.
2. Create a vmail account on the destination with same password, and backup as user vmail (would require changing vmail account to allow logon, which seems insecure).
3. Create a separate "backup" account on both machines with access to vmail folders (would still require resetting ownership after a restore though).
4. Some easier / better way I don't know about.
Any thoughts greatly appreciated!