If you are using a second server as a legitimate failover (and not just something you are splitting users across) use rsync instead to sync two remote filesystems:
Here is an article on doing that, just change the variables etc for your environment:
The folder to sync here is
So essentially, install miab on the new server (MAKE SURE ITS THE SAME VERSION) and then rsync the userdata folder something like:
- Install MIAB on new server, set up a BS domain with 1 email account (admin account)
systemctl stop mailinabox && mv /home/user-data /home/user-data-backup
- run the rsync command so that the new and old server user-data folder MATCHES EXACTLY
- restart the new server so all services can be restarted properly.
- on the old server, setup a cron job to run the rsync command ever x minutes (1,5,10,or 15 are good numbers) (Example crontab line for a 5 minute sync window:
*/5 * * * * rsync <some_shit_here>
- Let it do it’s thing.
Edit make sure to check logs, you may also need to add a few folders from
/etc/ notably, possibly
nginx, letsencrypt, hosts, resolv.conf, nsd, and maybe even more