migration fail

Hi, I am trying to migrate to a new virtual server from my current working one. I am following your document and all was going well until after I ran virtualmin restore-domain --source /root/backups/ --all-domains --all-features

everything seemed good - but when I check all my 'servers' in webmin, my configurations are not there (ssh, postfix etc) just the default ones. How can I migrate all my 'servers' across too please? please advise.

regards steve

Status: 
Active

Comments

Howdy -- when performing a migration, the Virtual Server information, as well as the Virtualmin configuration (such as server templates, account plans, backup information, and such) are migrated.

However, the configuration of specific daemons isn't migrated, as config files between any two servers generally aren't compatible.

For those, you would need to manually re-add any config file changes you had.

ok, thanks. Have done that - but now no mail is being delivered... it is all queuing up - HELP !!!

delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused

I have checked amavis and it is listening on 10024 and I can telnet to that port? What else can I try please ?

ok, got it. Amavis was running as a service - but was not installed???? very weird.

I tried to uninstall amavis and it said it was not installed, but was available? So, I installed it , restarted service and it worked. Very odd.

That is indeed unusual! But I'm glad you got it working.

Let us know if you have any other questions!

Ok, another issue..... (sorry)

when I validate my virtual server - each and every one gets a quota error: Administration user : Unix user belmac's quota of Unlimited does not match the domain owner's quota of 1024 MB

Then, in the other validation section i get:

Your Postfix version does not support per-domain outgoing IP addresses.

Virtualmin could not work out the default IPv6 address for virtual servers on your system. You will need to update either the Network interface for virtual addresses or Default virtual server IP address fields on the module configuration page.

please advise.

What should that user's quota be, unlimited, or 1GB?

Also, the other two messages you received when running the Re-Check Config are safe to ignore (unless you needed those features). Postfix on CentOS 6 doesn't support "per-domain outgoing IP addresses", but that's not a feature most people use. And the other message is safe to ignore unless you need IPv6.

on the old box - all quotas for users were 1gb with the exception of two users that were unlimited.

I can't really reset them as when you go to webmin - it says 'too many users to display' - unlike the group users one which you can see all and change easily.

Also... the old server had ioncube working, but I have setup the new server the same, but the ioncube website won't load. is there a trick to getting ioncube working on virtualmin please?

Ioncube is a PHP binary module, designed to run on a specific PHP version and architecture. If PHP changed, or the architecture changed, you may need to install a new Ioncube version for your system.

ok, got ioncube working - so , it is just the quotas issue now.

If you go into Edit Virtual Server -> Quotas and Limits, what is "Total server quota" and "Server administrator's quota" set to?

And if you change them slightly, does that correct the quota issue being reported for that domain?

do i have to do that for each one?

yes, they are at 1GB each. If i change it to 2GB, save it , go back in and put it too 1GB, save it - that fixes that domain. Surely, there must be a better way that having to do this for all my domain?

ok, fixed it by doing one at a time !!!! Now, last problem (i hope)... one of my domains keeps downloading .php files instead of displaying them. I have checked the configuration and it appears that it is the same as the old server - but it does not work. what could be wrong there?

sorry, no matter what i try - i cannot get .php files to show up in some of my domains. I can create a php.info.php file and it shows fine. But any of my existing websites that I migrated over will NOT load any of their index.php files - instead, wanting to download them. Please help !!

Well that's unusual... so you're saying that within the same domain, some PHP scripts work (such as the php.info.php script you added), but some don't (such as your existing index.php script).

What PHP Execution Mode is this domain set to use? You can determine that in System Settings -> Website Options.

Also, could you post the first few lines of your index.php file? Ie, what is the output of this command:

head index.php

Lastly, do you happen to see any errors in the $HOME/logs/error_log for that domain when accessing the index.php file?

Hi, Ok, sorted all those errors ... what I had to do was: 1. stop mysql 2. rename ibdata1 , ib_logfile0 and ib_logfile1 on the current mysql install (/var/lib/mysql) and then upload the old three files (same name) from the old server. 3. start mysql 4. backup the three databases that I was having issues with to my local PC. (see, these databases were NOT associated with any virtualmin domains). 5. reverse the process at (2.) above 6. drop the three databases 7. recreate the three database 8. import the backup files from local pc 9. restart mysql all works. BUT.... now I have run the server overnight - the only thing that is NOT working is the freshclam .
I get: ERROR: Can't open /var/log/freshclam.log in append mode (check permissions!). ERROR: Problem with internal logger (UpdateLogFile = /var/log/freshclam.log).

now, I have tried: 1. chmod 777 to freshclam.log - no good 2. chown clam:clam to freshclam.log - no good 3. chown clamav:clamav to freshclam.log - no good 4. deleting the /var/log/clamav directory and recreating it - no good 5. chown clam:clam /var/log/clamav - no good 6. chown clamav:clamav /var/log/clamav - no good.

What am i missing please?

Thanks for letting us know how you resolved the MySQL issue.

Regarding ClamAV, what is the output of these two commands:

ls -l /var/log/freshclam.log
lsattr /var/log/freshclam.log

[root@hosting init.d]# ls -l /var/log/freshclam.log ls: cannot access /var/log/freshclam.log: No such file or directory

[root@hosting init.d]# lsattr /var/log/freshclam.log lsattr: No such file or directory while trying to stat /var/log/freshclam.log

Ah, that explains it... I believe by default, CentOS 6 uses '/var/log/clamav/freshclam.log' for the freshclam log file. In this case though, it looks like it's currently trying to use /var/log/freshclam.log instead, which doesn't exist, and ClamAV doesn't have permission to write there.

What you may want to do is edit /etc/freshclam.conf, and set the UpdateLogFile option to use /var/log/clamav/freshclam.log.

That should resolve the issue you're seeing.

hmm, it already was:

[root@hosting steve]# grep 'UpdateLogFile' /etc/freshclam.conf UpdateLogFile /var/log/clamav/freshclam.log

Use system logger (can work together with UpdateLogFile).

[root@hosting steve]#

Well that's unusual, I wonder where it's finding that other setting.

What output do you receive if you run this command:

find /etc -type f | xargs grep -- 'UpdateLogFile'

[root@hosting public_html]# find /etc -type f | xargs grep -- 'UpdateLogFile'
/etc/freshclam.conf:UpdateLogFile /var/log/freshclam.log
/etc/oldfreshclam.conf:UpdateLogFile /var/log/clamav/freshclam.log

Hmm, that's definitely unusual, as that setting appeared correct when you looked earlier.

However, according to that output, it looks like UpdateLogFile is incorrectly set to /var/log/freshclam.log.

If you edit /etc/freshclam.conf with a text editor, can you verify that UpdateLogFile is correctly set to /var/log/freshclam.log?

ok, this is weird. yes, freshclam.conf was correct - so i uninstalled clam - removed all the conf files - reinstalled and now it's all working 1!!