• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Does a second migration update a previous one?

tetrahall

Basic Pleskian
Hi,
I have migrated a website to another server for testing purposes. In the meantime, the target server changed slightly, including some entries in the database and a few files in its content.

Now, if I migrate again, will it overwrite the previous migration altogether or simply update it?

Please advise. Thanks.
 
Ok, let me phrase the question a different way in the hope that someone would reply:

After migration, the MYSQL + PSA databases on the target server will have changed (few more entries) in each.

If I do the following:-
1. dump both databases on the target server
2. manually transfer the sql dumps to the new server
3. restore both MYSQL + PSA databases on the target server

Would the above steps update the databases on the new server?

Please help. Many thanks!
 
Why would the databases on the _target_ server change when it's not yet productive? You should not have anybody accessing your target server until you switch IP addresses.

The recommended way to perform a migration is:
1) Install the target server with the latest version of your OS + Plesk on a temporary IP
2) Initiate a migration with Plesk Migrator (this is done on the target server). This will transfer all accounts, subscriptions, databases, web and mail files from the source server to the target server
3) Close access to the services on the source server (for example by restricting access to it outside of the company network) and then re-sync the data in the Plesk Migrator extension. This will re-sync all databases and all files/directories that have changed since the initial transfer at step 2.
4) When done, switch IP addresses so that the target server owns the IP of the source server.

For more info also read: Plesk Migration and Transfer Guide
And also: What are known limitations of Plesk Migrator Extension?
 
Hi Monty,
Thank you for your answer. I agree with your approach. However, in our case, the target server should be unproductive for as short a time as possible - preferably one hour only. Let me explain briefly.

The PHP script on the target server is outdated (PHP 4). PHP 7 is installed on the new server. Many commands and functions are deprecated. The idea is to migrate, test the updated script to ensure that it works on PHP 7, then update the new server.

Migration takes a long time (24 hours minimum). It has been done. Now, I can manually add safely the web content to the new server (i.e. some html files). I am thinking of the following steps, which should take less than an hour to complete:-

1. De-activate the target server(something like Under Maintenance page).
2. Dump the MYSQL on the target server + manually transfer (copy) it to the new server
3. restore MYSQL database on the target server
4. switch IP address to the new server

The 4 steps should not take longer than one hour.

The question, is restoring the MYSQL database as mentioned above will update the *NEW* server's MYSQL database?

Thanks!
 
Last edited:
First of all, I think we'll have to be clear about the naming convention: When I'm talking about the "target server" then I'm referring to the NEW (empty) server.
new server = target server
old server = source server

Secondly, how many domains and websites are we talking about? The procedure I've outlined is meant for a multi-domain, multi-subscription server, let's say with 100 or 200 domains. How much data do you have on your source server?

If you only want to transfer 1 domain then you could do this either manually or using Plesk Migrator (where you have the option to migrate only a selected subscription instead of all subscriptions).

Nevertheless, the basic procedure still remains the same:
1) You install a fresh new OS with Plesk on the target server
2) Then you either create your subscription + domain + databases manually or use Plesk Migrator for it
3) Then you transfer your data to the target server, either manually (copy the files, dump database on the old server and import it on the new server) or with Plesk Migrator
4) Perform all your desired tests
5) When happy with it, re-sync the files + databases to the new server (again, either manually or with Plesk Migrator)
4) Change IP addresses of your domain

Regarding your question: When you manually import a database on the new server you need to pick an (empty) database to import your data into. So in this example you would pick the database for your domain that you've already created on the new server.
You must _not_ import all databases (like "mysql" or "psa"), as this will probably destroy your Plesk installation on the new server.
 
Hi,
I have migrated a website to another server for testing purposes. In the meantime, the target server changed slightly, including some entries in the database and a few files in its content.

Now, if I migrate again, will it overwrite the previous migration altogether or simply update it?

Please advise. Thanks.

@tetrahall

Even though you should follow the recommended method as proposed by @Monty, your original question has not been really answered.

As far as I know of, the following applies when migrating with the migration manager :

- databases are overwritten : this is common and good practice,
- migrated files are updated : common pitfalls with file migration still exist, but Plesk Migrator does not have them and/or accurately updates files in almost all cases,

and you should note that migrating files is taking "a snapshot in a brief moment of time" : if any file on the source server is changed during migration to a new server, migrated files on the target server will not be a correct representation of the (changed) files on the source server - for that reason, one could suspend the migrated subscription/domain.

The above should essentially answer your original question.

In addition, you tried to rephrase your question by posting

Ok, let me phrase the question a different way in the hope that someone would reply:

After migration, the MYSQL + PSA databases on the target server will have changed (few more entries) in each.

If I do the following:-
1. dump both databases on the target server
2. manually transfer the sql dumps to the new server
3. restore both MYSQL + PSA databases on the target server

Would the above steps update the databases on the new server?

Please help. Many thanks!

and you should really never do that!

However, dumping databases on the source server and restoring dumps on the target server should NOT be executed given the facts that

- one is migrating static dump files that contain only data that is specific to the source server,
- those static dump files often do not comply with Plesk and/or MySQL server related settings on the target server,
- there is always the danger of creating duplicate entries and/or duplicate databases (causing future problems of a severe nature),
- and so on.

Note that I am stating potential issues related to database migration only - in fact, by migrating databases only, one forgets to migrate all other relevant data : not all data is contained in some kind of database, being the Plesk (psa) database or a domain specific database.

Plesk Migrator is designed to alter all the relevant data to comply with the new target server and settings thereof.

In summary, Plesk Migrator is your choice for safe migration of any kind!

Hope the above gives a little bit of extra information.

Kind regards.......
 
Monty,
Thank you ever so much for both responses. Very useful. There is only one domain (and one subscription).

I am more confident now that, if the database on the new server is empty, then restoring the database should work.
Best regards!
 
Last edited:
@tetrahall

Even though you should follow the recommended method as proposed by @Monty, your original question has not been really answered.

As far as I know of, the following applies when migrating with the migration manager :

- databases are overwritten : this is common and good practice,
- migrated files are updated : common pitfalls with file migration still exist, but Plesk Migrator does not have them and/or accurately updates files in almost all cases,

and you should note that migrating files is taking "a snapshot in a brief moment of time" : if any file on the source server is changed during migration to a new server, migrated files on the target server will not be a correct representation of the (changed) files on the source server - for that reason, one could suspend the migrated subscription/domain.

The above should essentially answer your original question.

In addition, you tried to rephrase your question by posting



and you should really never do that!

However, dumping databases on the source server and restoring dumps on the target server should NOT be executed given the facts that

- one is migrating static dump files that contain only data that is specific to the source server,
- those static dump files often do not comply with Plesk and/or MySQL server related settings on the target server,
- there is always the danger of creating duplicate entries and/or duplicate databases (causing future problems of a severe nature),
- and so on.

Note that I am stating potential issues related to database migration only - in fact, by migrating databases only, one forgets to migrate all other relevant data : not all data is contained in some kind of database, being the Plesk (psa) database or a domain specific database.

Plesk Migrator is designed to alter all the relevant data to comply with the new target server and settings thereof.

In summary, Plesk Migrator is your choice for safe migration of any kind!

Hope the above gives a little bit of extra information.

Kind regards.......

Thank you, trialotto, for the detailed notes. I will carefully consider them before proceeding.

Kind regards.
 
Back
Top