Migrating Plesk Accounts from One Server to Another
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:
clients – is telling the pleskbackup program to backup a client, which includes client account along with all limits, IPs, domains and settings, etc that are associated with the account./usr/local/psa/bin/pleskbackup clients paulusworldadmin /path/to/backup
paulusworldadmin is the client we’re backing up.
/path/to/backup where to write the backup file.
- 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/usr/local/psa/bin/pleskrestore --create-map backup.file -map backup.map
- To restore the account:
--restore is specifies the file that you created with pleskbackup/usr/local/psa/bin/pleskrestore --restore backup.file -level clients -map backup.map
-level clients level want to restore. In this case we wanted restore an entire client account.
-map backup.map tells pleskrestore to use the backup.map, which was in step 2.6.
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.