Procedure
- Create a backup of the account that you want to migrate for testing purposes:
- Login to the server via ssh
- Get the user account that you want to backup, for example paulusworldadmin.
- To backup a user account with all data:
Upload the backup file.
- Login via ssh on the server you want to import the backup to.
- Create a map file:
You may need to modify the domain's IP address in the backup.map
- To restore the account:
Once you have successfully tested and performed and needed changes, change the A records TTL to 300s. If the TTL was set to 86400, then you will need to wait a day before you can change the A record.
- If possible put the site into offline mode. If the site does not have an offline mode, then create a .htaccess file and redirect all traffic, except yours to a page that tells users the site is down for maintenance.
- Perform Step 1 again.
- Change the DNS record.
- Wait 24 hours before shutting off the domain on first server.
- Shut off the domain.
- Copy the emails that still got delivered to the first server to the second server. Emails will be stored in /var/qmail/mailnames/domainname/
- Remove the client account from the server.
Issues
- After updating the A record for the mail, providing the server handles emails, some smart phones will cache the old IP.
- If the client exists on both servers, then you will need to backup the domain and restore it on the other server:
- Login to Plesk and find the domain you want to backup
- Perform the backup and download the file.
- Create the domain
- Upload the backed up file under the same client on the second server.
- Restore the domain.