Support,
I found a postfix main.cf bug in the Virtualmin backup/restore process.
I used the following bash shell command on the old server:
# virtualmin backup-domain --dest /backup/full/ --all-domains --all-features --newformat --all-virtualmin
and ran the following command on the new server:
# virtualmin restore-domain --source /backup/full/virtualmin.tar.gz --all-virtualmin
# virtualmin restore-domain --source /backup/full/ --all-domains --all-features
GOOD NEWS: The entire backup/restore went perfectly.
BAD NEWS: The restore command *also* changed the new server /etc/postfix/main.cf file.
Instead of my new server having these lines:
myhostname = server.newserver.com
mydestination = newserver.com, server.newserver.com, localhost.newserver.com, localhost
it was changed to this:
myhostname = server.oldserver.com
mydestination = oldserver.com, server.oldserver.com, localhost.oldserver.com, localhost
So all my email started bouncing with the "looping back onto itself" errors.
Comments
Submitted by JamieCameron on Tue, 09/17/2013 - 13:24 Comment #1
Was oldserver.com or newserver.com one of the domains in the backup?
Submitted by jimdunn on Tue, 09/17/2013 - 19:57 Pro Licensee Comment #2
No, but close...
The actually domains were like this:
www.domain1.com www.domain2.com
On domain2.com, there was a virtual server called domain3.com
When domain2.com was restored to domain1.com (migrating domain3.com with it) then I had the domain3.com in the /etc/postfix/main.cf file instead of domain1.com
Submitted by JamieCameron on Tue, 09/17/2013 - 23:32 Comment #3
Actually, I see the issue here - if you use the
--all-virtualmin
flag, the backup will contain the Postfix configuration as well, which meansmain.cf
andmaster.cf
. This is useful if you want to create a backup for restoring locally, but as you saw it may cause problems when restoring on a new machine.The solution is to limit the global settings you want to backup. Instead of the
--all-virtualmin
flag, you could instead use :--virtualmin config --virtualmin templates --virtualmin resellers --virtualmin email --virtualmin custom --virtualmin scripts --virtualmin styles --virtualmin scheds --virtualmin chroot
Submitted by jimdunn on Wed, 09/18/2013 - 15:05 Pro Licensee Comment #4
Where can I find a list of all possible "--virtualmin ???" options? I tried HELP, but it only listed "config".
Oh, I found them, had to put in a bad --virtualmin jjj and it printed the options.
For the GPL version, options are:
config templates email custom scripts scheds chroot mailserver
Thx!
Submitted by andreychek on Wed, 09/18/2013 - 16:16 Comment #5
The ones he mentioned above are 9 out of the 10 available --virtualmin options.
The only one he left out was "--virtualmin mailserver", but that's not one you'd want to use in this case.