• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Test import before proper move

PJK

Active member
#1
I'm about to move a large forum from vB 4 to XF. I want to test the import and make sure all works and play around with the site for a few days before releasing it live. What's the best way of doing this?

Once I have the data imported to play around with, how do I clear the database such that when I'm ready to do the actual full migration to go live, it is up to date?

Thanks.
 

PJK

Active member
#3
Thanks. I've already added a few forums and stuff and installed a theme on the test XF install. Should I just delete all the forums and do a fresh db backup or do I have to re-install to get it fresh?

Everything is fresh aside from the installed theme and a couple test forums and posts.
 

PJK

Active member
#4
Basically you take a backup after configuring everything on the XenForo site before creating any content/importing data. You can then revert to the backup later before doing the final import.

See this guide for details:

https://xenforo.com/community/threads/importing-guidelines.25325/
I've already added a few forums and stuff and installed a theme on the test XF install. Should I just delete all the forums and do a fresh db backup or do I have to re-install to get it fresh?

My plan is to implement all the features I want, tweaks, etc., then delete all the users, posts, and forums I made to test, then back that up as the default to revert back to. Will that be okay?
Thanks.
 

Brogan

XenForo moderator
Staff member
#5
My plan is to implement all the features I want, tweaks, etc., then delete all the users, posts, and forums I made to test, then back that up as the default to revert back to. Will that be okay?
No, that won't work.

As the guide states, the backup must be taken before creating any content.
 

PJK

Active member
#8
The next step is the most important; using phpMyAdmin or similar, take a backup of the database.
This backup will then be the clean master database, which can be used over and over again until you're ready to do the import for the final time.
Regarding this, I've done a test import into the database "name_xen". I want to revert back to the backup test.sql that I made of the db before the import. What's the best way to do this? Go into name_xen and drop all tables, then import test.sql into it (via phpmyadmin)? Thanks.
 

Brogan

XenForo moderator
Staff member
#9
Yes, drop the tables first, then import the backup.

As it's a clean build and relatively small, you may be able to get away with using phpMyAdmin to import (and export) it.
If it results in any corruption or weirdness though, you will need to use SSH.

This is what I use:

Dump:
Code:
mysqldump -udatabase_user -p --single-transaction --skip-lock-tables database_name > /path/to/backup/database_name_$(date +%d.%m.%y).sql
Zip (only required for archiving purposes):
Code:
tar -czf database_name_$(date +%d.%m.%y).tar.gz /path/to/backup/database_name_$(date +%d.%m.%y).sql
Restore:
Code:
mysql -udatabase_user -p database_name < backup.sql
 

PJK

Active member
#10
Thanks for the info. The db is 3GB, and using the Import in the AdminCP it took about 2 hours to do the import. I'd give SSH a test to see if it goes well.

With vB we were using [video] tags to share videos. I just noticed in all our video posts it nows shows like this as the BBcode doesn't work:
[video=youtube;JuqPJxmeR7G]https://www.youtube.com/watch?v=JuqPJxmeR7G[/video]

I added a [video] tag with an optional parameter, and now all the videos look tiny like this:
https://www.dropbox.com/s/t1ooj0zwinnd41b/Screenshot 2016-04-04 11.06.46.png?dl=0
What's the best way to resolve this so videos format normally and okay?
 

Mr Lucky

Well-known member
#11
Thanks for the info. The db is 3GB, and using the Import in the AdminCP it took about 2 hours to do the import. I'd give SSH a test to see if it goes well.

With vB we were using [video] tags to share videos. I just noticed in all our video posts it nows shows like this as the BBcode doesn't work:
[video=youtube;JuqPJxmeR7G]https://www.youtube.com/watch?v=JuqPJxmeR7G[/video]

I added a [video] tag with an optional parameter, and now all the videos look tiny like this:
https://www.dropbox.com/s/t1ooj0zwinnd41b/Screenshot 2016-04-04 11.06.46.png?dl=0
What's the best way to resolve this so videos format normally and okay?
This addon

https://xenforo.com/community/resources/post-content-find-replace.1549/
 

PJK

Active member
#12
Thanks. I installed the addon, but can't find how to use it anywhere. I don't see it in Options or Tools, and when I go to List Addons it's there, but can't click it. Where do I find it in the AdminCP to use it?

That aside, I've installed a few addons that I'm playing with for this first test merge. When I drop all the tables and revert back to the "fresh" db to test the import again, do I need to reinstall these addons via the xml upload? The files ofc will still be uploaded as I'm not changing the file structure.
 

Mr Lucky

Well-known member
#14
Thanks. I installed the addon, but can't find how to use it anywhere. I don't see it in Options or Tools, and when I go to List Addons it's there, but can't click it. Where do I find it in the AdminCP to use it?
It should be under Tools, look for Replace in Posts

Examples of replacement regex to use for various things are in the addon thread somewhere.
 

PJK

Active member
#17
Yes, the files already exist on the server.
Thanks. There are some custom user fields like Youtube channel and another profile we have on vB. Is there any way to get these imported? Virtually all of our 30k members use them, so requiring them to re-enter them would be a bit frustrating. Thanks.
 

Brogan

XenForo moderator
Staff member
#18
Anything which isn't imported with the built in importer would require a custom script or would have to be redone post-import.
 

PJK

Active member
#19
Anything which isn't imported with the built in importer would require a custom script or would have to be redone post-import.
Can you help with this? 1 custom user profile field that is 10 characters or so I want migrated over. Thanks.