Author Topic: Problems with restore function for New Backup  (Read 1064 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Problems with restore function for New Backup
« on: July 08, 2020, 10:11:05 AM »
I needed to migrate to a new server.
I had problems getting the CWP Migration feature working.
I decided to give the New Backup (beta) tool a go.

The new backup systems seems to be massive improvement over the old backup.
Great Work.  Thank-you.  Here is a recount of my experiences using it.

TL;DR (skip to 4, User Panel still not working)

I setup the new server as a remote backup target on the old server and did a manual backup of all accounts.
These were transfered to the new server and appeared in a folder /full/manual
On the new server I added a custom path for restoration for /full/manual/accounts

I did find some issues along the way

1. When I attempted to restore more that one account at a time, only the first was restored AND the process hung and had to be killed (even a reboot would not resolve it, but there is a kill process button). Restoring single accounts never had this issue for me.

2. Another problem I encountered was to do with Addon Domains.  Only the primary domain was added to /etc/named.conf.  I added those addon domains manually and got them working OK.

3. Mailboxes.  Any account with mailboxes was not restored correctly. Two issues.  I didn't realise these problems until I had restored all the accounts so I was able to fix the problems in bulk.

3a. MySQL postfix database was missing entries.  To resolve this I made a backup of the postfix database on the old server using this command
mysqldump postfix > postfix.sql
I copied the postfix.sql to the new server and then restored it like so.
cat ~/postfix.sql | mysql postfix
I was lucky that the list of accounts on the old server was exactly the same as the new server, because this method overwrites the new servers postfix database entirely.

3b. The /var/vmail server on the new server was much smaller (by many GB) than the old server. Once again I did a manual backup of the files on the old server.
cd /var/vmail
tar zcf vmail.tgz *

Copy this file to the new server, then, on the new server

cd /var/vmail
tar zxf ~/vmail.tgz


4. Last remaining problem (which I have not yet fully found a fix for), is that I cannot login to a user panel (e.g. on port 2083).  There are parts to this also.  The first problem is that the user password doesn't appear to be restored.  If I cut/paste the users password section from /etc/shadow on the old server to the new server, then it get's a bit further.  It says "Successful Login, you are being redirected", but simply redirects back to the loging form.
The exact same thing happens when I click on the tool icon next to the username in "List Accounts".

I did create a brand new account on the new server and it IS able to login to the user panel; but none of the restored accounts are able to use the user panel.

My immediate problem is that I really want to find a way to enable the user panel on these accounts.
Longer term it would be good to see all these issues resolved.






Offline
*
Re: Problems with restore function for New Backup
« Reply #1 on: July 10, 2020, 11:42:16 PM »
I found a solution to my problem.  The issue was caused because the accounts did not have a valid package assigned.
I was able to use this mysql statement to fix it.
update root_cwp.user set package=1;
I imagine you could also use the web interface to change the package to one that exists.