I am hoping that someone can advise me on the best way to move a MySQL OJS database to a new server
We are currently running OJS version 3.2.1.1. I am in the process of setting up a brand new server that runs version 3.4.0-7. I know that there are several changes to the database schema between those two versions.
Is there some way I could sqldump the original database, sqlimport it into MySQL on the new server and run some *.sql to make the required schema changes?
I had originally been intending to just point my new server at the existing database, but:
the schema is obviously different.
I don’t want to upgrade OJS/database on the old server as they are due to be retired.
I can’t make a duplicate database (on which to run the upgrade) on the old MySQL server as it is running out of space.
Do you have shell access to both servers? MySQL has a mysqldump command that can export a database as an SQL file. You can use this command to make a copy of the database, and then move this file to the new server. After creating your database you can import the SQL file using a regular mysql -u yourUser -p yourDatabase < dump.sql type syntax.
There’s no need to run SQL commands on the database to change the schema. The upgrade scripts that come with OJS do this automatically for you during the upgrade.
So, it seems like I might have been approaching the problem from the wrong angle.
Instead of setting up my new server with the latest version of the OJS and then shoe-horning in the old database, should I have moved the old database to the new server, set up the older version of the OJS on the new server and then upgraded it in the new location?