Forum

[SOLVED] Migration ...
 
Notifications
Retirer tout

[SOLVED] Migration from old server/version to new

16 Posts
2 Utilisateurs
0 Reactions
6,163 Vu
(@cpt_jabberwock)
Posts: 56
Trusted Member
Début du sujet
 
[#9285]

Hello, I have some question about migrations of our Projeqtor instances on old servers to new ones
We are making new servers for the instances we have, which are as follow:

We tested this 2 times without errors on the (1.) beside what I will explain later
1. Projeqtor 11.1.3 -> 11.1.3
2. Projeqtor 9.5.5 -> 11.1.3

Debian 9 -> Debian 12 (We tried to upgrade the debian on the production machine but it borks projeqtor so we decided to just make a new one and migrate the data)
PHP 7.0.30 -> PHP 8.2
Mysql 15.1 stayed the same but
MariaDB 10.1.37 (readline 5.2)-> 10.11.4 (Editline Wrapper)

We did a Mysql dump from the old server to the new, and copied the the 4 Files directories (Attach, Config, Documents, Logs) in their new server counterpart to keep our attachments and other documents

We also copied the Images directory from Projeqtor main directory in /var/www/htm/projeqtor to have our custom images in headers, login page, etc

Everything works, even the LDP login BUT:
The Resources Profile photos did not follow and
I have to reinstall the plugins unless I copy the entire Plugins folder from /var/www/htm/projeqtor to the new /var/www/htm/projeqtor and I noticed that all my modifications using ScreenCustomization had not followed to the new server

Where should I look to have the settings from ScreenCustom back in the new server with all custom field back with the data they had intact ?
This is still in testing and we have our written procedure to get to this point without any problem

We also need to do this on a separate instance that had a problem in updating from 9.5.5 onwards (Convertion to UTF8_MB4 didn't work even when it was just a copy of the principal production projeqtor)

Can we use the same procedure and the data will adjust from 9.5.5 -> 11.1.3 ?

Or are we making a mistake and we need to copy the entire /var/www/htm/projeqtor to the new server on both instance and update the 9.5.5 one manually ?
What should we copy from old to new to optimally upgrade Projeqtor ?

Thank you

ps: If you need more information, do not hesitate


 
Posté : 01/02/2024 1:34 pm
(@babynus)
Posts: 14952
Membre Admin
 

To retreive all (thumbs, customization) copy all projeqtor code from old to new server.
Then overwrite with new version. 


 
Posté : 01/02/2024 1:46 pm
(@cpt_jabberwock)
Posts: 56
Trusted Member
Début du sujet
 

Thank you,
We dit this:
1.dump mysql db to the new server and import
2.copy projeqtor in var/html/projeqtor
3.copy filesprojeqtor (the attachments, logs, config, etc) and other in filesprojeqtor same location as old server

Everything worked perfectly (nearly)
we just have those 2 error messages (usually when Projeqtor disconnect user after a long time, or when we click disconnect)

2024-02-22 09:34:41.324 ** ERROR ** [V11.1.3] on file '/var/www/html/projeqtor/view/login.php' at line (38)
2024-02-22 09:34:41.324 ** ERROR ** [V11.1.3] cause = Cannot modify header information - headers already sent by (output started at /var/www/html/projeqtor/tool/projeqtor.php:46)
38      header ('Content-Type: text/html; charset=UTF-8');

and
2024-02-26 09:32:28.325 ** ERROR ** [V11.1.3] on file '/var/www/html/projeqtor/model/UserMain.php' at line (1889)
2024-02-22 09:34:41.324 ** ERROR ** [V11.1.3] cause = Cannot modify header information - headers already sent by (output started at /var/www/html/projeqtor/tool/projeqtor.php:46)
1889      $result=setcookie("projeqtor",pq_nvl($cookieHash),time()+3600*24*7,'/',pq_nvl($domain),$secure,$httpOnly);

What is the problem ? the first one is the usual one that appear when Projeqtor disconnect from extended idling (20-30min)
Those are really not problematic but if we can solve them, it would be easier
Tell me if you need anything else

Thank you


 
Posté : 26/02/2024 4:36 pm
(@babynus)
Posts: 14952
Membre Admin
 

Strange, you PHP seems to write some output on session_start();
(this is not expected)
Maybe it's due to specific PHP configuration (please chack all sessions.xxxx parameters in php.ini)
Possibly you can change line 45 in tool/projeqtor.php 
from

  session_start();

to

  ob_start();
  session_start();
  ob_clean();

 


 
Posté : 28/02/2024 1:58 pm
(@cpt_jabberwock)
Posts: 56
Trusted Member
Début du sujet
 

Hello,
Thanks for the answer to this

I'll look over this for the Main Projeqtor over the next few days
I have some other problems but on the Projeqtor Cab (instance separate for more sensitive things) : these  

As for the Migration for Projeqtor Cab 9.5.5 to a new server and a new version (for some reason, upgrading debian mess up Projeqtor)
It goes from :
Debian 9 to a 12.5
PHP 7.030 to a PHP 8.2
Mysql nothing really changes

However, we have several problems doing this the same way we did the Main Projeqtor
Mysqldump
Copy of filesprojeqtor (Log, config, attach, and document)
Copy of projeqtor in var/www/html

first, the dump of the mysql db has a problem when touching "historyarchive" table (biggest table of the entire projeqtor db)
it can read about 75% of the table but crashes and loses connection when nearing the end of this specific table (historyarchive) which seems to be the history of every action done followed by "save" in projeqtor from what little I understood of each entries

mysqldump -u root -p --ignore-table=projeqtor.historyarchive projeqtor > projeqtor20240209.sql

worked, bu not

mysqldump -u root -p projeqtor > projeqtor20240209.sql
select * from historyarchive;

makes the command crash

select * from historyarchive limit 100000;

works, bigger like 250 000  or such, will crash

First attachment is what happens in projeqtor (log) when we did a dump and the dump didn't work
 

in mysql we had those
 

 

This is the log of mysql
 

and my colleague did those
* in the file /etc/mysql/mariadb.conf.d/50-custom-mariadb.cnf he added
 

* and also innodb_force_recovery = 4
* Deleted the files ib_logfile0 et ib_logfile1 et ibdata (/var/lib/mysql).
* launched the command  mysqlcheck -u root -p projeqtor

all without success

Doing a dump of the db without Historyarchive and doing a dump for it separately worked (all at once doesn't work)
we then tried to import both of those and then copy filesprojeqtor and projeqtor in their respective place

it worked, to a point.
We got to the login screen, but entering credentials did this  

The new server had a new projeqtor 11.1.3 installed as a default (always using same template as to not get tangled)
we copied a 9.5.5 over the files
first part of the log is when we just overwrote the /var/www/htm/projeqtor files
the last 3 errors (1 try and 2 F5) is when we deleted entirely projeqtor from /html/projeqtor and copied the old one from 9.5.5 server

From what we understood, the old projeqtor try to call PHP commands that are deprecated in PHP 8.2 that worked in PHP 7.030

Did updating Projeqtor to 10 and then 11 update its php calls ? And from all those tests, we could not update 9.5.5 because the Mysql crashed due to historyarchive
How would we go about purging the Historyarchive table in Mysql ?

Thanks
 


 
Posté : 28/02/2024 5:30 pm
(@babynus)
Posts: 14952
Membre Admin
 

Did updating Projeqtor to 10 and then 11 update its php calls ?

Yes, new versions of ProjeQtOr are always compliant with new versions of PHP (for instance V11.2 will be compliant with PHP 8.3)

How would we go about purging the Historyarchive table in Mysql ?

There is not need, and no real need the retreive it : historyarchive stores history of changes that are older than 1 year on concerning closed items.

Take care that installing ProjeQtOr 11.1.3 then installing DB from old 9.5.5 without purging the DB will leave some tables created between 9.5.5 and 11.1.3 (the dump does not purge all tables, it erases and recreates tables existing in the dump).
Side effect is that you'll get errors when migrating to V11.1.3 because of already existing tables. This is not a major issue (tables are correct) but you must be aware of that.


 
Posté : 03/03/2024 5:15 pm
(@cpt_jabberwock)
Posts: 56
Trusted Member
Début du sujet
 

Hello, It worked .... mostly
I thought of something to update the 9.5.5 on the new Debian 12 Test server
Following what you said, we made a dump without the Historyarchive table
we then tried to migrate the projeqtor onto the new Debian 12/Php 8.2 directly like we did with the other instance
However, 9.5.5 had too many PHP calls using the old commands and it made too much problems

So, I decided to try something else
We removed HistoryArchive from the mysql and then I tried to update projeqtor from 9.5.5 to 11.1.5 on a copy of the server in Debian 9
Doing 9.5.5 to 11.1.5 in one go borked it
Doing 9.5.5 to 11.1.5 by doing each individual update possible (the bold ones in the Autoinstall plugin) worked
This means I could then Migrate the newly updated Projeqtorcab to a debian 12 like I did the other ?

However, I encountered several problems after checking the Main Projeqtor and working a little on the Projeqtorcab test right here

First, on the Projeqtorcab I got this error message at some point in the log
Is it asking me to recreate historyarchive and each column in the table ?
 

Second, I got this error, and I don't know at all what it means
 

 

Third, I had this problem on some pages on the Cabinet test
First Image is the Main Projeqtor (the already updated one)
 

The second one is the Newly updated Cabinet test (still on Debian 9)
 

Finally, we didn't touch the updates on the Main Projeqtor after the Migration (and its test instance Formation which is a copy) until after our tests with Cabinet
When we click on the new updates in the plugin AutoInstall, it doesn't do anything and we get this error
 

 

 

I checked the same php files on the debian 9 Cabinet and didn't find anything different but maybe I missed something (we don't touch the php files in Projeqtor unless its something you told us to change)

Do you have solutions for one of those 4 problems ?
Ask me if you need more information/log/config file

Thank you
 


 
Posté : 15/04/2024 11:36 am
(@babynus)
Posts: 14952
Membre Admin
 

historyarchive must exist.
So you have to create it (even if empty)


 
Posté : 19/04/2024 5:17 pm
(@cpt_jabberwock)
Posts: 56
Trusted Member
Début du sujet
 

Thank you,
From my last post, the 4 problems

1 & 3 were linked, for some reasons
I haven't had this error log since recreating the Historyarchive table
and the screen got its background and the options got their proper name header after the table got added back to mysql

2: No Idea what that thing is still

4: Problem on updates on the Debian 12
it was the Curl extention of PHP that isn't installed by default on new server
thus making Autoinstall work again on the new Debian 12 (since we copied only Projeqtor, we had forgotten that Curl was an addon not installed by default)


 
Posté : 25/04/2024 4:17 pm
(@babynus)
Posts: 14952
Membre Admin
 
2: No Idea what that thing is still

it is due to missing comma before "startDate"
The source is use of an old version of Screen Customisation plugin. Be sure to migrate to latest one.


 
Posté : 28/04/2024 9:33 pm
(@cpt_jabberwock)
Posts: 56
Trusted Member
Début du sujet
 

Now that you say it and I look at the line proper, it seems so evident

"thingy" "stardate" missing the comma in between the 2

Thank you, now that everything is back to normal, we just need to purge the historyarchive from projeqtorcab, then I'll be able to upgrade it as much as possible on the old debian 9 before migrating to debian 12


 
Posté : 29/04/2024 11:07 am
(@cpt_jabberwock)
Posts: 56
Trusted Member
Début du sujet
 

hello again, hopefully this will be the last problem on this topic

We finally migrated to Debian 12.5 and Projeqtor 11.1.5 from the old Debian 9 Projeqtor 9.5.5 for our last Instance

Everything worked in our tests, but on the final stratch, I get these problems

1. I have the same problem as before on some pages (ie: Today page)
 

The dialogue box doesn't have proper title in french and the page itself is missing formatting

2. I get those errors (I included the full log so you see everything worked until then
Everything before 11h47 was on the old Server on Debian 9
 

All my custom lists are empty when I go in Screencustomization but in Tickets, where they are used, they work (even if they give errors in the log)
Can you point us towards the problem ?
If you notice anything else wrong in the log, please tell me
Thank you for your time


 
Posté : 06/05/2024 3:13 pm
(@babynus)
Posts: 14952
Membre Admin
 

You have an issue in youir screen customization plugin.
Try and revert to older version of plugin, then back to last.


 
Posté : 11/05/2024 9:31 pm
(@cpt_jabberwock)
Posts: 56
Trusted Member
Début du sujet
 

There is no risk to the data in the plugin If I revert and come back ?

(Do I delete them and reinstall ?)


 
Posté : 14/05/2024 11:08 am
(@babynus)
Posts: 14952
Membre Admin
 
There is no risk to the data in the plugin If I revert and come back ?

No

(Do I delete them and reinstall ?)

No, if you delete you'll loose data.
Just install older (V6.0 for instance) then last one (V7.0)


 
Posté : 16/05/2024 7:11 pm
Page 1 / 2
Share:
Retour en haut