The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Moving database

4 posters

Go down

Moving database Empty Moving database

Post by Blue-ZiZ 25/3/2008, 18:49

Hi there.

Yesterday I was told that you can host your own forum, with a little help from phpBBs download section at phpbb.com, so I downloaded it, got myself a MySql database and was ready to post our new forum on my website. Now, I asked the members/users of the forum, wether they wanted a new forum - and start all over again, or they wanted to stick to the old one, they toke the "old one". And now I just wanted to know, if it is possibel to take your database from your .forumotion.com to a phpBB.com -downloaded forum version.

Hope there is someone who can answer me on that, thanks

Regards, - Blue-ZiZ
avatar
Blue-ZiZ
New Member

Posts : 2
Reputation : 0
Language : English // Danish

Back to top Go down

Moving database Empty Re: Moving database

Post by travis_cooper 25/3/2008, 18:52

You can't. You don't have access to the db. You can on your new forum just create all the threads that have been created on your forum so far though, and insert directly into the db all your users and all the posts. You will have to do this by hand though. If you don't have too many posts and users you can probably do this without too much problem. If you know enough about programing you could write up a simple program to just do this for you.
travis_cooper
travis_cooper
Forumember

Male Posts : 698
Reputation : 0
Language : English
Location : Salt Lake City, Utah

http://photochallenge.forumotion.com/

Back to top Go down

Moving database Empty Re: Moving database

Post by Blue-ZiZ 25/3/2008, 23:49

Okay, thank you. Just what I needed to know.
avatar
Blue-ZiZ
New Member

Posts : 2
Reputation : 0
Language : English // Danish

Back to top Go down

Moving database Empty Re: Moving database

Post by QuantumCowboy 10/7/2008, 07:25

It's a bit tedious, but you can transfer your site out of forumotion post by post using copy/paste and a little knowledge of SQL and the table structure. It took me about a month working off and on in some of my free time... sounds like a lot, but it's not like the old forum had to be down for that long.. just the last couple of days for the final touches. I transferred 33 users and 657 posts. I can see how this would be impractical for larger forums, but if you're relatively small still and want to get out of the cage here, it may be worth your time - thats for you to decide. As travis suggests there could be a php or other script that does this for you, but I dont know how to code it...


1. Get a real hosting site. This will probably cost you money, but you get a huge amount of features and customizability... oh, and total control too!


2. Install phpbb3.0. This can be done in just a few clicks on Dreamhost. immediately lock new registrations from the adminstration control panel (ACP) or you will get a million bots.


3. Access the SQL database for the new forum using phpMyAdmin (should be included with your host package). You will need to edit phpbb_users, phpbb_user_group, phpbb_forums, phpbb_topics, and phpbb_posts. When you are working on the new forums, I found it convenient to open up each in a different tab in firefox.


4. create your forum structure from the ACP as you would normally, with the same hierarchy as your old site.


5. open phpbb_users. The admin account you created as part of the installation should be user_id 2.


6. Click "Insert" at the top. This will give you a default record. To transfer your first non-admin user, make a unique user ID for them (I started at 101 and went onwards in order of registration). Leave everything as it is by default except group_id = 2 for regular users, username should be the username, and username_clean should be the usrename in all lowercase with any spaces or symbols (including underscores) removed. The last fields you need to set are user_email (the email address of the user) and password (set to something generic and select MD5 from the pulldown menu to the left of it). At the bottom, change "Save" to "Insert as New Row" and then press Go. Repeat for all users. Optional is user_regdate, which should be set to the unix time stamp of the user's registration date. See www.unixtimestamp.com for a conversion tool.


7. For every user_id, create a record in phpbb_user_group where group_id=2.


8. Making a new thread is a bit of work, but transferring posts into it once it is up is pretty easy... single post threads may not be worth it. Your call.

Create a thread by going to phpbb_topics and making a new row. Create a unique topic_id for every new thread. The forum_id should match the forum_id field in the phpbb_forums table for all the forums you created in step 4. topic_title is the thread subject. topic_poster is the user_id for the user who started the thread. topic_time is the unix time stamp of the thread time. I just transferred all posts within a thread as having the post time of the last post (for sorting purposes the last post time is more important than the first post time), that saves time.

set topic_views, and then set topic_replies and topic_replies_real to the same value, the number of actual replies. in reality, topic_replies contains the total replies posted, and topic_replies_real ignores pruned or moved posts.

topic_type is 0 for normal, 1 for sticky, 2 for announcement

topic_first_post_id, topic_first_poster_name, topic_last_post_id, topic_last_poster_id, and topic_last_poster_name should be self explanatory. nothing else is strictly required.


9. transfer the posts within the thread by creating records in the phpbb_posts table. the fields you need are post_id (must be unique), topic_id, forum_id, poster_id, post_time, and post_text. copy/paste the old post text into post_text. The unique post_id of the first and last posts in a thread have to match the respetive fields in the phpbb_topics table.

Repeat steps 8 and 9 to transfer all of your board content, minus polls and with some minor BBCode problems. phpbb will automatically fill in the rest of the fields as required. Near the completion, I informed my users of the change in venue, locked the old forum, transferred the remaining latest posts, and hit "Resychronize Statistics" in the new site's ACP. This updated all new user and forum post counts. It was then fairly straightforward to email usres their temp passwords and have them set up their profiles again.

Tedious? Yes. But still, one month of working every now and then in my spare time, and I am now forumotion free forever, retaining the bulk of my previous content. I realize it may be impractical for some people or boards, but here it is in case you can use it.

I'll probably be banned shortly, so best of luck and see you on the flip side!
avatar
QuantumCowboy
New Member

Posts : 3
Reputation : 0
Language : English

Back to top Go down

Moving database Empty Re: Moving database

Post by Huscarl_1016 2/12/2008, 00:38

Quantum

Great post, but surely this can be done (with Firefox) with the add-on called Scrapbook?

This program literally copies a page, or pages (including images and live links etc) exactly as they are and can be opened at a later date- just as if you were viewing and clicking into the actual website itself!
Huscarl_1016
Huscarl_1016
Forumember

Posts : 58
Reputation : 0
Language : English

http://anglosaxonengland.darkbb.com/forum.htm

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum