PDA

View Full Version : Configure ImpExConfig to Merge From a Backup



Knightmane
Mon 19th Jan '09, 6:06am
We are having to move from one server (where are public board has been all this time) to another server (where the legal testvb board has been all this time) and none of our members want to lose our hard earned posts from over the past year.

It mentions in the ImpExConfig that this is possible, but there are no line-examples to base any change attempts on.


# If the system that is being imported from uses a database,
# enter the details for it here and set 'sourceexists' to true.
# If the source data is NOT stored in a database, set 'sourceexists' to falseHow do I configure the ImpExConfig file... where instead of looking for a database, it would read from a vbulletin.sql backup file?

I tried changing the rest and got errors which include:

Username and password are incorrect
vbfields table already exists

I am not a programmer nor a script writer myself, so I need to know how I can do this. A visual example would help not only myself, but anyone else having this problem. I don't have any "command line input" programs, so if I can do this with ImpEx, that would save a lot of time and effort.

Thanks in advance.

PS: If all else fails, we're ready to delete and start anew, which would be a huge loss of hard earned data.... again.

Dilly
Mon 19th Jan '09, 8:07am
You need to restore the SQL file to a database first.

Knightmane
Tue 20th Jan '09, 12:35am
Well, DUH... but that doesn't help. We need to merge the old board into the test board. And I am not allowed to have 2 MySQL accounts on that server. So what do I do?

EDIT:

Setting the setting to false still does not tell me where to have ImpEx look for the file or files to read from, because it states that it only reads from the source database to make the merger.

bigwater
Tue 20th Jan '09, 1:00am
So are the live board and the test board both the same version? Is there database data on the test board that must remain once you migrate the live data there, or can it be completely re-written with the live board's data?

If all you're trying to do is overwrite the test board data with the live data, just pull a dump of the database if you have shell access, or ask your host to do it if you don't



mysqldump --opt -q -uusername -ppassword -databasename > backupfile.sql

Wouldn't hurt to pull the same backup on your test database just in case somthing goes wrong. Once you get the live database dumped, transfer it to the new server and get a shell prompt there.



mysql
use databasename -uusername -ppassword
/. backupfile.sql
done.

Dilly
Tue 20th Jan '09, 1:50am
Well, DUH... but that doesn't help. We need to merge the old board into the test board. And I am not allowed to have 2 MySQL accounts on that server. So what do I do?
Obviously not duh, considering you were trying to do this:

How do I configure the ImpExConfig file... where instead of looking for a database, it would read from a vbulletin.sql backup file?

Knightmane
Tue 20th Jan '09, 3:41am
I think I will wait to see what Steve says and not a bunch of fan boys who don't understand the situation. Unless you work for Vbulletin, you're not helping.

And Bigwater...

I said, MERGE DATABASES, not overwrite. And they ARE the same version (3.8.0). My host has stated that she does not have time to do this, as my account is my business and I am responsible for how things get done in there. AND she does not know ANYTHING about how Vbulletin Databases work and she does not wish to know. That's not her expertise field.

bigwater
Tue 20th Jan '09, 3:51am
Well some of us who don't work for vBulletin actually do know what we're doing, and we don't sit around here blowing smoke just to hear the fancy tooting noises.

Steve's a busy man. Wait on him if you want... but I think he'll be the first to pipe up and say if you're doing a vBull to vBull migration, Impex is not really the best way to go. The data is already native, the tables are already normal. Just dump your database and restore it with the normal tools made available with mysql and be done wth it.

My .02. I'll leave you to your anger now.

Dilly
Tue 20th Jan '09, 9:23am
I think I will wait to see what Steve says and not a bunch of fan boys who don't understand the situation. Unless you work for Vbulletin, you're not helping.

And Bigwater...

I said, MERGE DATABASES, not overwrite. And they ARE the same version (3.8.0). My host has stated that she does not have time to do this, as my account is my business and I am responsible for how things get done in there. AND she does not know ANYTHING about how Vbulletin Databases work and she does not wish to know. That's not her expertise field.
Goose.

To merge the 2 databases, you first need to restore the SQL file for the second database to a new database. Impex cannot read a .sql file. It's as simple as that. But hey, what would I know. I'm just a fanboy. lol

Apparently your host is not the only one who knows nothing about databases...

Steve Machol
Tue 20th Jan '09, 5:22pm
You cannot run Impex on a backup file. You need to restore that backup to a fresh database, edit ImpEConfig.php to point the source db info the that database, then run Impex.

Knightmane
Wed 21st Jan '09, 12:56am
I apologize to Dilly and Bigwater for what they thought was anger.

However... if I followed your given advices on what to do and something went wrong, Vbulletin policy does not provide support on fixes that were suggested by non-Vbulletin personnel (Members). And chances are, especially in my case, something would have definitely gone wrong. I have seen this time and time again happen to other Vbulletin customers with the same results.

That is why I wanted to hear Steve's official word on this.

But I must add that it is misleading in the ImpExConfig file to suggest that reading from files is possible if the program simply cannot do it. And it clearly shows that it is possible.

So if it doesn't mean files as in a backup file, what is it referring to? Are the database tables downloadable as files or is there something I am not understanding here? The ReadMe, nor the Manual and Docs URLs, explain what it means by "files."

Steve Machol
Wed 21st Jan '09, 1:18am
It is not misleading at all. That option is for BB systems that store the data in files instead of the database, such as UBB.Classic.

You will have to restore that backup file to a database before you can import the data.

bigwater
Wed 21st Jan '09, 1:23am
Yes, database files are just regular files. However your statement in an earlier post that "I am not allowed to have 2 MySQL accounts on that server" indicates that you are on a shared server and therefore wouldn't have root access necessary to access those files.

With only 1 database allowed on the server, you're pretty much stuck with doing your merge as a remote connection. If you could get both databases on the same server, it would be less of a configuration headache, but it's not an insurmountable task. If you have ssh access to both server spaces you can pull dumps and pass them off to somebody with the ability to set up more than one account on the same box. That would be your best bet.

I have to ask though, what data is in the test database that you need merged with your live data? Normally when I set up a test board for a client I put a copy of their existing database at the time the test board was created in place so that they have a sandbox to play in. Typically that test database gets tossed when time goes to bring the test board live and replaced by the live database, as the live files contain all the data the test files contained, plus new data introduced since the test site was set up. You've indicated that both sites are the same version (3.8) so your table structures will be the same. The only caviat is that if you've added any hacks to the test board that you want migrated to the live board, you may need to get specific tables moved over, but this is not really merging data.

It sounds like this may be a bit over your head and I'd suggest finding yourself a consultant that does this stuff on a regular basis to handle it for you.

Knightmane
Wed 21st Jan '09, 2:06am
Now you understand my situation, Bigwater. You do understand the situation after all. And yes, this has been a hassle to deal with. As for your other question, I will have to take that to a private message.

Thanks to everyone for the help they could give.