Chris Thompson
Chris Thompson

Reputation: 35598

Thoughts on migrating Joomla from one database server to another?

I've been building a joomla-based website for the past couple of months and the time has come to migrate the site from my personal development server to the production one. My initial thought was to dump the database and recreate it on the production server, but I'm wondering if there is a better way. Unfortunately there is some content already present on the development server that I need to preserve, otherwise I would just "reinstall" and apply the template I created.

Any thoughts?

Thanks, Chris

Upvotes: 1

Views: 483

Answers (3)

markus
markus

Reputation: 40685

First of all I would like to point out that you need not meddle with /lib/mysql, or mysqldump if you have a phpmyadmin on both platforms. Moving mysql databases around is really easy and secure just with exporting structure and data as 'sql' and running the whole thing as query in the new place.

Plus there is the great 'JoomlaPack' which is probably what you want to use anyways. JoomlaPack can backup your entire site including additional databases, etc. and reinstall the whole package using a modified JoomlaInstaller on any other server.

Now in your case the whole thing is a bit more complicated than this because you have content on each server and if I get you right you need to merge the content.

Possible solutions:

1) How much content do you need to merge? If the amount of content on the production server is small, just hand-migrate it to your test environment first, then use JoomlaPack to make a full backup, upload the backup to your production environment and use the JoomlaPack installer to make a fresh install of Joomla including your data and everything!

2) If it is a bit more, you can start with a 'diff' (comparison) of the 'sql' data dumps of both versions then merge that data carefully and proceed as in 1). You can use WinDiff for this or TortoiseDiff if you have TortoiseSVN installed.

Upvotes: 2

DisgruntledGoat
DisgruntledGoat

Reputation: 72560

Yep, under your mysql installation (normally somewhere like /lib/mysql) there should be a folder for each database. You can simply copy this, eg download as a zip file, upload to new location and extract. It definitely works to copy databases on the same server, don't see why it wouldn't work on a different server.

If it doesn't though, you can use something like PHPMyAdmin (probably simpler, actually). Just log in, select the database then click Export on the top of the right frame. Tick to save as file. You can then import this on your new server.

Upvotes: 0

gsirianni
gsirianni

Reputation: 1364

Unfortunately you can't copy the mdf and ldf files like a MSSQL database and reattach. The following is an article on how to copy a MySql database from one server to another.

Copy MySql Database

Upvotes: 0

Related Questions