XF 2.2 Importing Database

Brandon K

Active member
I'm attempting to import a XenForo 2.2 database from another forum on a different server into my forum's database to merge the forums. Is there a compressive guide that shows me every step of the way of what needs to be done? I'm very meticulous and want something that's more or less is a dummy proof guide.

From what I understand you first need to download the database into a sql file and then upload that into a new database on the same server of your primary database.

From there do I need to download the files from the merging database onto my primary server and does it need to be the same root folder?

MySQL server
MySQL port
MySQL user name
MySQL password
MySQL database name

Data directory
Internal data directory

When I'm filing this out what exactly do I need to put here after I'm copied the database? The same info from the old config file or do I need to make a new one?

And what goes in those last two lines?

And do I copy the full

$config['db']['username'] = 'xyx';

or just the xyz in those spaces?

Apologies for if this has been asked a million times. I just want to make sure I do this right.
 
Create a new database instance on the same server as the existing XF installation.

Import the second database into it.

Copy the data and internal_data directories for the second site onto the same server.

Configure the importer in the XF installation and run the import.
 
MySQL server
MySQL port
MySQL user name
MySQL password
MySQL database name

Data directory
Internal data directory

This is the first form that pops up after the Importer is initiated.

Is this taken from the old server's config file or the designation server's config file?
 
Code:
XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'type_data' in 'field list' in src/XF/Db/AbstractStatement.php at line 228
XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 39
XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 54
XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 94
XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 218
XF\Db\AbstractAdapter->insert() in src/XF/Import/Data/EntityEmulator.php at line 327
XF\Import\Data\EntityEmulator->insert() in src/XF/Import/Data/AbstractEmulatedData.php at line 71
XF\Import\Data\AbstractEmulatedData->write() in src/XF/Import/Data/AbstractData.php at line 127
XF\Import\Data\AbstractData->save() in src/addons/XFI/Import/Importer/XenForo2.php at line 1536
XFI\Import\Importer\XenForo2->stepThreads() in src/XF/Import/Runner.php at line 242
XF\Import\Runner->runStep() in src/XF/Import/Runner.php at line 59
XF\Import\Runner->run() in src/XF/Admin/Controller/Import.php at line 234
XF\Admin\Controller\Import->actionRun() in src/XF/Mvc/Dispatcher.php at line 350
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 257
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2300
XF\App->run() in src/XF.php at line 488
XF::runApp() in admin.php at line 13

I just received this on my first test run. Any help?
 
I, too, am trying to use XFImporter to bring over the resources (and maybe users) from another community I own into a new one... I understand everything but the data directory and internal data directory field which it asks you to complete. It doesn't explain (or I haven't seen it) in detail to the novice what these are for in the manual.

I am thinking it has something to do with the directories in which the xenforo files reside. In the source database everything resides in the root folder. In the new installation, XF exists in a subfolder... am I on the right path?

I do NOT want to do a database import and screw things up (even though I do have backups) --- could someone, @Brogan or anyone whose been down this road before, provide a little help and insight into how I should go about this and what needs to go in those fields?

Thank you!
 
Hmm ... it's pretty obvious, isn't it?
(Though to be honest I haven't imported many XF2 so far, but countless other systems)

Data directory = Path to the directory that contains the contents of directory data of the XenForo you want to import.

Internal Data directory = Path to the directory that contains the contents of directory internal_data of the XenForo you want to import.

These are the only two directories that are required; you don't need any other other directories from the source.
 
Last edited:
Well, it's more obvious that if I am posting a thread asking questions about it that it is not pretty obvious to me. In this, or any other community, there is a problem with that type of mentality. If you don't prefer to help, than you don't have to reply at all.

I have only imported one forum over and it was several years ago. I do not remember the details to that and therefore because I am still having troubles getting the import to work -- here I am asking.

The manual for the importer also does not dive into the connection settings either.

Nonetheless, I've figured it out.

Either way, appreciate your passive/aggressive reply.
 
Last edited:
Back
Top Bottom