This article should serve as a complement to regular migration article and its aim is to explain to advanced users which steps need to be taken during migration in order to not lose any tracking requests and to be able to process them after the migration is completed. Here is how you should proceed:
- Copy the files to the new location the usual way.
- If you had cron job set up for the installation you need to disable cron for the old location on your server and you can also rename scripts/jobs.php to something else. Make sure that you or any other administrator who has access to merchant panel doesn't run cron job from there manually.
- Now log in to your database administration tool and go to qu_g_settings table and look for cronLastRun line and set its time to any date in the future, for example any date in year 2030. If you don't see this line then most probably cron has never run for your installation so run URL_to_PAP/scripts/jobs.php in your browser and then you should have this line in database.
- From now on all the tracking requests pointing to this old location are still tracked and saved in qu_pap_visits0, qu_pap_visits1, qu_pap_visits2 tables, however since cron is set to run only in 2030 the application will not process these requests and will pile them up in visits tables.
- Now you are ready to copy the database, from the above mentioned visits tables you should copy only the structure, to the new location and then change the DNS or URL address in tracking codes to the new location.
- When you are set up on the new location and the tracking is directed there as well you should get the visits tables from the old location and merge them with the tables on the new location.
- Now if you wish to use cron job on the new location you should set up cron by following the steps from Tools->Integration->Cron job integration and it will slowly start to process all the tracking requests saved in the visits tables.
If on the other hand you don't want to use use cron job, then you need to change cronLastRun line in qu_g_settings table to a past time, older then 15 minutes ago and then the application will process all new requests in real time, however you will still need to manually process the ones you migrated, to do that go to Tools->Integration->Cron job->Show Pending Background Tasks->Start cron manually and keep it running until the visits tables are empty.